| 8c3e263d | 11-Dec-2021 |
Simon J. Gerraty <[email protected]> |
veriexec: mac_veriexec_syscall compat32 support
Some 32bit apps may need to be able to use MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL
Therefore compat32 support is req
veriexec: mac_veriexec_syscall compat32 support
Some 32bit apps may need to be able to use MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL
Therefore compat32 support is required.
Obtained from: Juniper Networks, Inc.
show more ...
|
| 8512d82e | 02-Apr-2023 |
Steve Kiernan <[email protected]> |
veriexec: Additional functionality for MAC/veriexec
Ensure veriexec opens the file before doing any read operations.
When the MAC_VERIEXEC_CHECK_PATH_SYSCALL syscall is requested, veriexec needs to
veriexec: Additional functionality for MAC/veriexec
Ensure veriexec opens the file before doing any read operations.
When the MAC_VERIEXEC_CHECK_PATH_SYSCALL syscall is requested, veriexec needs to open the file before calling mac_veriexec_check_vp. This is to ensure any set up is done by the file system. Most file systems do not explicitly need an open, but some (e.g. virtfs) require initialization of access tokens (file identifiers, etc.) before doing any read or write operations.
The evaluate_fingerprint() function needs to ensure it has an open file for reading in order to evaluate the fingerprint. The ideal solution is to have a hook after the VOP_OPEN call in vn_open. For now, we open the file for reading, envaluate the fingerprint, and close the file. While this leaves a potential hole that could possibly be taken advantage of by a dedicated aversary, this code path is not typically visited often in our use cases, as we primarily encounter verified mounts and not individual files. This should be considered a temporary workaround until discussions about the post-open hook have concluded and the hook becomes available.
Add MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL and MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL to mac_veriexec_syscall so we can fetch and check label contents in an unconstrained manner.
Add a check for PRIV_VERIEXEC_CONTROL to do ioctl on /dev/veriexec
Make it clear that trusted process cannot be debugged. Attempts to debug a trusted process already fail, but the failure path is very obscure. Add an explicit check for VERIEXEC_TRUSTED in mac_veriexec_proc_check_debug.
We need mac_veriexec_priv_check to not block PRIV_KMEM_WRITE if mac_priv_gant() says it is ok.
Reviewed by: sjg Obtained from: Juniper Networks, Inc.
show more ...
|
| 94288674 | 17-May-2019 |
Stephen J. Kiernan <[email protected]> |
Add a new ioctl for the larger params struct that includes the label.
We need to make the find_veriexec_file() function available publicly, so rename it to mac_veriexec_metadata_find_file_info() and
Add a new ioctl for the larger params struct that includes the label.
We need to make the find_veriexec_file() function available publicly, so rename it to mac_veriexec_metadata_find_file_info() and make it non-static.
Bump the version of the veriexec device interface so user space will know the labelized version of fingerprint loading is available.
Approved by: sjg Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D20295
show more ...
|
| 6cbc9703 | 17-May-2019 |
Stephen J. Kiernan <[email protected]> |
Obtain a shared lock instead of exclusive in the MAC/veriexec MAC_VERIEXEC_CHECK_PATH_SYSCALL per-MAC policy system call.
When we are checking the status of the fingerprint on a vnode using the per-
Obtain a shared lock instead of exclusive in the MAC/veriexec MAC_VERIEXEC_CHECK_PATH_SYSCALL per-MAC policy system call.
When we are checking the status of the fingerprint on a vnode using the per-MAC-policy syscall, we do not need an exclusive lock on the vnode.
Even if there is more than one thread requesting the status at the same time, the worst we can end up doing is processing the file more than once.
This can potentially be improved in the future with offloading the fingerprint evaluation to a separate thread and blocking until the update completes. But for now the race is acceptable.
Obtained from: Juniper Networks, Inc. MFC after: 1 week
show more ...
|
| ed377cf4 | 17-May-2019 |
Stephen J. Kiernan <[email protected]> |
sysctls which should be restricted when securelevel is raised should also be restricted when veriexec is enforced.
Add mpo_system_check_sysctl method to mac_veriexec which does this.
Obtained from:
sysctls which should be restricted when securelevel is raised should also be restricted when veriexec is enforced.
Add mpo_system_check_sysctl method to mac_veriexec which does this.
Obtained from: Juniper Networks, Inc. MFC after: 1 week
show more ...
|