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
Unknown Object (File)
Sun, Oct 27, 3:04 AM
Unknown Object (File)
Oct 18 2024, 12:09 PM
Unknown Object (File)
Oct 6 2024, 9:50 AM
Unknown Object (File)
Oct 3 2024, 10:50 AM
Unknown Object (File)
Oct 3 2024, 8:53 AM
Unknown Object (File)
Sep 27 2024, 1:44 PM
Unknown Object (File)
Sep 25 2024, 2:28 PM
Unknown Object (File)
Sep 23 2024, 11:06 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 Not Applicable
Unit
Tests Not Applicable