mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-17 19:54:32 +00:00
80bc7ee8fa
Adds support for new policy statements whitelisting individual ioctl commands. Ioctls provide many of the operations necessary for driver control. The typical driver supports a device specific set of operations accessible by the ioctl system call and specified by the command argument. SELinux provides per operation access control to many system operations e.g. chown, kill, setuid, ipc_lock, etc. Ioclts on the other hand are granted on a per file descriptor basis using the ioctl permission, meaning that the set of operations provided by the driver are granted on an all-or-nothing basis. In some cases this may be acceptable, but often the same driver provides a large and diverse set of operations such as benign and necessary functionality as well as dangerous capabilities or access to system information that should be restricted. Example policy: allow <source> <target>:<class> { 0x8900-0x8905 0x8910 } auditallow <source> <target>:<class> 0x8901 The ioctl permission is still required in order to make an ioctl call. If no individual ioctl commands are specified, only the ioctl permission is checked by the kernel - i.e. status quo. This allows ioctl whitelisting to done in a targeted manner, protecting desired drivers without requiring every ioctl command to be known and specified before use and otherwise allowing existing policy to be used as-is. This only implements ioctl whitelisting support for monolithic kernel policies built via checkpolicy. Support for modules and CIL remains to be done. Bug: 19419509 Change-Id: I198e8c9279b94d8ce4ae5625018daa99577ee970 Signed-off-by: Jeff Vander Stoep <jeffv@google.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> |
||
---|---|---|
.. | ||
test | ||
.gitignore | ||
Android.mk | ||
ChangeLog | ||
checkmodule.8 | ||
checkmodule.c | ||
checkpolicy.8 | ||
checkpolicy.c | ||
checkpolicy.h | ||
COPYING | ||
Makefile | ||
module_compiler.c | ||
module_compiler.h | ||
parse_util.c | ||
parse_util.h | ||
policy_define.c | ||
policy_define.h | ||
policy_parse.y | ||
policy_scan.l | ||
queue.c | ||
queue.h | ||
VERSION |