selinux: extended permissions for ioctls
Add extended permissions logic to selinux. Extended permissions provides additional permissions in 256 bit increments. Extend the generic ioctl permission check to use the extended permissions for per-command filtering. Source/target/class sets including the ioctl permission may additionally include a set of commands. Example: allowxperm <source> <target>:<class> ioctl unpriv_app_socket_cmds auditallowxperm <source> <target>:<class> ioctl priv_gpu_cmds Where unpriv_app_socket_cmds and priv_gpu_cmds are macros representing commonly granted sets of ioctl commands. When ioctl commands are omitted only the permissions are checked. This feature is intended to provide finer granularity for the ioctl permission that may be too imprecise. For example, the same driver may use ioctls to provide important and benign functionality such as driver version or socket type as well as dangerous capabilities such as debugging features, read/write/execute to physical memory or access to sensitive data. Per-command filtering provides a mechanism to reduce the attack surface of the kernel, and limit applications to the subset of commands required. The format of the policy binary has been modified to include ioctl commands, and the policy version number has been incremented to POLICYDB_VERSION_XPERMS_IOCTL=30 to account for the format change. The extended permissions logic is deliberately generic to allow components to be reused e.g. netlink filters Signed-off-by:Jeff Vander Stoep <jeffv@google.com> Acked-by:
Nick Kralevich <nnk@google.com> Signed-off-by:
Paul Moore <pmoore@redhat.com>
-
mentioned in commit 05b7da58
-
mentioned in commit bd8d3dd3
-
mentioned in commit bd8d3dd3
-
mentioned in commit 631a078d
-
mentioned in commit d9349dea
-
mentioned in commit dbdf659c
-
mentioned in commit 138b86b9
-
mentioned in commit 5847d772
-
mentioned in commit 8b2495a8
-
mentioned in commit e12b0dc0
-
mentioned in commit bf85946e
-
mentioned in commit aa3e2bf0
-
mentioned in commit 18bb4ed8
-
mentioned in commit 4c8980f2
-
mentioned in commit 12d7d47d
-
mentioned in commit 7ac9f2a4
-
mentioned in commit ad1107ba
-
mentioned in commit dc427516
-
mentioned in commit 291dbad6
-
mentioned in commit 6caaaded
-
mentioned in commit 71d4a644
-
mentioned in commit 4af2be38
-
mentioned in commit 6cb89c40
-
mentioned in commit 4438b763
-
mentioned in commit 20856e62
-
mentioned in commit 053f7d2c
-
mentioned in commit a0b6635b
-
mentioned in commit 67d7936b
-
mentioned in commit cd02dedb
-
mentioned in commit 0ce6599d
-
mentioned in commit 5f502d1c
-
mentioned in commit fd009455
-
mentioned in commit f3651864
-
mentioned in commit 141198ae