Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 61d612ea authored by Jeff Vander Stoep's avatar Jeff Vander Stoep Committed by Paul Moore
Browse files

selinux: restrict kernel module loading


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;

Signed-off-by: default avatarJeff Vander Stoep <jeffv@google.com>
[PM: fixed return value of selinux_kernel_read_file()]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 0c6181cb
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment