Skip to content
Snippets Groups Projects
  • Stephen Smalley's avatar
    7adb999e
    Restrict the ability to set usermodehelpers and proc security settings. · 7adb999e
    Stephen Smalley authored
    
    Limit the ability to write to the files that configure kernel
    usermodehelpers and security-sensitive proc settings to the init domain.
    Permissive domains can also continue to set these values.
    
    The current list is not exhaustive, just an initial set.
    Not all of these files will exist on all kernels/devices.
    Controlling access to certain kernel usermodehelpers, e.g. cgroup
    release_agent, will require kernel changes to support and cannot be
    addressed here.
    
    Expected output on e.g. flo after the change:
    ls -Z /sys/kernel/uevent_helper /proc/sys/fs/suid_dumpable /proc/sys/kernel/core_pattern /proc/sys/kernel/dmesg_restrict /proc/sys/kernel/hotplug /proc/sys/kernel/kptr_restrict /proc/sys/kernel/poweroff_cmd /proc/sys/kernel/randomize_va_space /proc/sys/kernel/usermodehelper
    -rw-r--r-- root     root              u:object_r:usermodehelper:s0 uevent_helper
    -rw-r--r-- root     root              u:object_r:proc_security:s0 suid_dumpable
    -rw-r--r-- root     root              u:object_r:usermodehelper:s0 core_pattern
    -rw-r--r-- root     root              u:object_r:proc_security:s0 dmesg_restrict
    -rw-r--r-- root     root              u:object_r:usermodehelper:s0 hotplug
    -rw-r--r-- root     root              u:object_r:proc_security:s0 kptr_restrict
    -rw-r--r-- root     root              u:object_r:usermodehelper:s0 poweroff_cmd
    -rw-r--r-- root     root              u:object_r:proc_security:s0 randomize_va_space
    -rw------- root     root              u:object_r:usermodehelper:s0 bset
    -rw------- root     root              u:object_r:usermodehelper:s0 inheritable
    
    Change-Id: I3f24b4bb90f0916ead863be6afd66d15ac5e8de0
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
    7adb999e
    History
    Restrict the ability to set usermodehelpers and proc security settings.
    Stephen Smalley authored
    
    Limit the ability to write to the files that configure kernel
    usermodehelpers and security-sensitive proc settings to the init domain.
    Permissive domains can also continue to set these values.
    
    The current list is not exhaustive, just an initial set.
    Not all of these files will exist on all kernels/devices.
    Controlling access to certain kernel usermodehelpers, e.g. cgroup
    release_agent, will require kernel changes to support and cannot be
    addressed here.
    
    Expected output on e.g. flo after the change:
    ls -Z /sys/kernel/uevent_helper /proc/sys/fs/suid_dumpable /proc/sys/kernel/core_pattern /proc/sys/kernel/dmesg_restrict /proc/sys/kernel/hotplug /proc/sys/kernel/kptr_restrict /proc/sys/kernel/poweroff_cmd /proc/sys/kernel/randomize_va_space /proc/sys/kernel/usermodehelper
    -rw-r--r-- root     root              u:object_r:usermodehelper:s0 uevent_helper
    -rw-r--r-- root     root              u:object_r:proc_security:s0 suid_dumpable
    -rw-r--r-- root     root              u:object_r:usermodehelper:s0 core_pattern
    -rw-r--r-- root     root              u:object_r:proc_security:s0 dmesg_restrict
    -rw-r--r-- root     root              u:object_r:usermodehelper:s0 hotplug
    -rw-r--r-- root     root              u:object_r:proc_security:s0 kptr_restrict
    -rw-r--r-- root     root              u:object_r:usermodehelper:s0 poweroff_cmd
    -rw-r--r-- root     root              u:object_r:proc_security:s0 randomize_va_space
    -rw------- root     root              u:object_r:usermodehelper:s0 bset
    -rw------- root     root              u:object_r:usermodehelper:s0 inheritable
    
    Change-Id: I3f24b4bb90f0916ead863be6afd66d15ac5e8de0
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>