sysfs-selinux-checkreqprot 1.4 KB

1234567891011121314151617181920212223242526
  1. What: /sys/fs/selinux/checkreqprot
  2. Date: April 2005 (predates git)
  3. KernelVersion: 2.6.12-rc2 (predates git)
  4. Contact: selinux@vger.kernel.org
  5. Description:
  6. REMOVAL UPDATE: The SELinux checkreqprot functionality was removed in
  7. March 2023, the original deprecation notice is shown below.
  8. The selinuxfs "checkreqprot" node allows SELinux to be configured
  9. to check the protection requested by userspace for mmap/mprotect
  10. calls instead of the actual protection applied by the kernel.
  11. This was a compatibility mechanism for legacy userspace and
  12. for the READ_IMPLIES_EXEC personality flag. However, if set to
  13. 1, it weakens security by allowing mappings to be made executable
  14. without authorization by policy. The default value of checkreqprot
  15. at boot was changed starting in Linux v4.4 to 0 (i.e. check the
  16. actual protection), and Android and Linux distributions have been
  17. explicitly writing a "0" to /sys/fs/selinux/checkreqprot during
  18. initialization for some time. Support for setting checkreqprot to 1
  19. will be removed no sooner than June 2021, at which point the kernel
  20. will always cease using checkreqprot internally and will always
  21. check the actual protections being applied upon mmap/mprotect calls.
  22. The checkreqprot selinuxfs node will remain for backward compatibility
  23. but will discard writes of the "0" value and will reject writes of the
  24. "1" value when this mechanism is removed.