Page MenuHomeFreeBSD

shmfd/mmap: restrict maxprot with MAP_SHARED + F_SEAL_WRITE
ClosedPublic

Authored by kevans on Dec 30 2019, 10:58 PM.
Tags
None
Referenced Files
F170105069: D22978.id66168.diff
Thu, Sep 3, 12:53 PM
Unknown Object (File)
Wed, Sep 2, 9:27 AM
Unknown Object (File)
Tue, Sep 1, 11:56 PM
Unknown Object (File)
Tue, Sep 1, 1:13 PM
Unknown Object (File)
Tue, Sep 1, 12:47 PM
Unknown Object (File)
Mon, Aug 31, 9:50 AM
Unknown Object (File)
Sun, Aug 30, 12:38 PM
Unknown Object (File)
Sun, Aug 30, 6:09 AM
Subscribers

Details

Summary

If a write seal is set on a shared mapping, we must exclude VM_PROT_WRITE as the fd is effectively read-only. This was discovered by running devel/linux-ltp, which mmap's with acceptable protections specified then attempts to raise to PROT_READ|PROT_WRITE with mprotect(2), which we allowed.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 28394