HomeFreeBSD

mac_veriexec: add mac_priv_grant check for NODEV

Description

mac_veriexec: add mac_priv_grant check for NODEV

Allow other MAC modules to override some veriexec checks.

We need two new privileges:
PRIV_VERIEXEC_DIRECT process wants to override 'indirect' flag

			on interpreter

PRIV_VERIEXEC_NOVERIFY typically associated with PRIV_VERIEXEC_DIRECT

			allow override of O_VERIFY

We also need to check for PRIV_VERIEXEC_NOVERIFY override
for FINGERPRINT_NODEV and FINGERPRINT_NOENTRY.
This will only happen if parent had PRIV_VERIEXEC_DIRECT override.

This allows for MAC modules to selectively allow some applications to
run without verification.

Needless to say, this is extremely dangerous and should only be used
sparingly and carefully.

Obtained from: Juniper Networks, Inc.

Reviewers: sjg
Subscribers: imp, dab

Differential Revision: https://reviews.freebsd.org/D39537

Details

Provenance
Simon J. Gerraty <sjg@juniper.net>Authored on Jul 29 2019, 10:38 PM
stevekCommitted on Apr 16 2023, 11:14 PM
Differential Revision
D39537: mac_veriexec: add mac_priv_grant check for NODEV
Parents
rGe5551216d8e5: makefs: call brelse from bread
Branches
Unknown
Tags
Unknown