freebsd-src/sys/security
dl 2ef8baba4c Increase protection provided by veriexec with new unlink/rename hooks.
Functions implemented :

- mac_veriexec_vnode_check_unlink: Unlink on a file has been
  requested and requires validation. This function prohibits the
  deleting a protected file (or deleting one of these hard links, if
  any).
- mac_veriexec_vnode_check_rename_from: Rename the file has been
  requested and must be validated. This function controls the renaming
  of protected file
- mac_veriexec_vnode_check_rename_to: File overwrite rename has been
  requested and must be validated. This function prevent overwriting of
  a file protected (overwriting by mv command).

The 3 fonctions together aim to control the 'removal' (via unlink) and
the 'mv' on files protected by veriexec. The intention is to reach the
functional level of NetBSD veriexec.

Add sysctl node security.mac.veriexec.unlink to toggle control on
syscall unlink.

Add tunable kernel variable security.mac.veriexec.block_unlink to toggle
unlink protection. Add the corresponding read-only sysctl.

[ tidied up commit message, trailing whitespace, long lines, { placement ]

Reviewed by: sjg, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/613
2023-03-14 09:04:31 -06:00
..
audit
mac IfAPI: Add if_get/setmaclabel() and use it. 2023-01-31 15:02:15 -05:00
mac_biba IfAPI: Add if_get/setmaclabel() and use it. 2023-01-31 15:02:15 -05:00
mac_bsdextended
mac_ddb mac_ddb: Fix the show rman validator. 2022-08-12 10:20:05 -07:00
mac_ifoff IfAPI: Add if_get/setmaclabel() and use it. 2023-01-31 15:02:15 -05:00
mac_lomac IfAPI: Add if_get/setmaclabel() and use it. 2023-01-31 15:02:15 -05:00
mac_mls IfAPI: Add if_get/setmaclabel() and use it. 2023-01-31 15:02:15 -05:00
mac_none
mac_ntpd
mac_partition
mac_pimd
mac_portacl
mac_priority
mac_seeotheruids
mac_stub
mac_test
mac_veriexec Increase protection provided by veriexec with new unlink/rename hooks. 2023-03-14 09:04:31 -06:00
mac_veriexec_parser mac_veriexec_parser: fix build after 7e1d3eefd4. 2022-09-09 14:09:08 +02:00