android_kernel_lge_bullhead/security
Jeff Vander Stoep 1ccf2d2e84 BACKPORT: selinux: restrict kernel module loading
Backport notes:
Backport uses kernel_module_from_file not kernel_read_file hook.
kernel_read_file replaced kernel_module_from_file in the 4.6 kernel.
There are no inode_security_() helper functions (also introduced in
4.6) so the inode lookup is done using the file_inode() helper which
is standard for kernel version < 4.6.

(Cherry picked from commit 61d612ea731e57dc510472fb746b55cdc017f371)

Utilize existing kernel_read_file hook on kernel module load.
Add module_load permission to the system class.

Enforces restrictions on kernel module origin when calling the
finit_module syscall. The hook checks that source type has
permission module_load for the target type.
Example for finit_module:

allow foo bar_file:system module_load;

Similarly restrictions are enforced on kernel module loading when
calling the init_module syscall. The hook checks that source
type has permission module_load with itself as the target object
because the kernel module is sourced from the calling process.
Example for init_module:

allow foo foo:system module_load;

Bug: 27824855
Change-Id: I64bf3bd1ab2dc735321160642dc6bbfa996f8068
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2019-08-26 17:02:55 +02:00
..
apparmor This is the 3.10.107 stable release 2018-01-25 17:57:41 -07:00
integrity EVM: Use crypto_memneq() for digest comparisons 2017-06-08 00:46:46 +02:00
keys micro-optimization: Use DSTRLEN to remove incorrect strlen uses 2019-08-26 13:31:43 +02:00
selinux BACKPORT: selinux: restrict kernel module loading 2019-08-26 17:02:55 +02:00
smack
tomoyo
yama security: let security modules use PTRACE_MODE_* with bitmasks 2016-10-20 00:46:31 +02:00
Kconfig FROMLIST: security,perf: Allow further restriction of perf_event_open 2016-06-20 18:47:29 +00:00
Makefile
capability.c
commoncap.c This is the 3.10.98 stable release 2018-01-25 17:22:34 -07:00
device_cgroup.c
inode.c vfs: Add permission2 for filesystems with per mount permissions 2017-01-09 20:41:09 +00:00
lsm_audit.c IKSWL-3373: selinux: Improve avc logging 2019-08-26 17:02:46 +02:00
min_addr.c
security.c security: selinux: Add Per-File-Encryption hooks 2014-05-21 15:56:51 +03:00