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
F110687903: D22978.diff
Fri, Feb 21, 10:12 PM
Unknown Object (File)
Sat, Feb 8, 4:59 PM
Unknown Object (File)
Mon, Feb 3, 8:53 PM
Unknown Object (File)
Wed, Jan 29, 2:39 PM
Unknown Object (File)
Nov 29 2024, 2:09 PM
Unknown Object (File)
Nov 26 2024, 3:55 PM
Unknown Object (File)
Nov 25 2024, 12:12 PM
Unknown Object (File)
Oct 27 2024, 3:04 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