Skip to contentSkip to conversation

modutils: Dontaudit CAP_SYS_ADMIN checks for modprobe

PATCH New Luis Ressel 2 participants 3 messages Nov 15, 2017 – Nov 18, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 modutils: Dontaudit CAP_SYS_ADMIN checks for modprobe

The ttm module, a dependency of radeon/amdgpu, does some capable(CAP_SYS_ADMIN) checks. Changes in 4.13 have caused some of these checks to be executed during module initialization, in the context of modprobe, which fills the audit logs with a lot of denials.

Since failing these capable() checks is not an issue (they merely control the access to emergency memory reserves, which shouldn't be an issue during boot), I'm dontauditing them.

One potential issue with this is that if a module that actually needs CAP_SYS_ADMIN during initialization comes along later, the dontaudit is going to make the debugging a bit more annoying. Is anyone concerned about this?

---
 policy/modules/system/modutils.te | 2 ++
 1 file changed, 2 insertions(+)
policy/modules/system/modutils.te +2 -0
index fe42b0f1d..5e66c4439 100644
@@ -37,6 +37,8 @@ ifdef(`init_systemd',`
 
 allow kmod_t self:capability { dac_override net_raw sys_nice sys_tty_config };
 allow kmod_t self:process { execmem sigchld sigkill sigstop signull signal };
+# for the radeon/amdgpu modules
+dontaudit kmod_t self:capability sys_admin;
 
 allow kmod_t self:udp_socket create_socket_perms;
 allow kmod_t self:rawip_socket create_socket_perms;
Signature · 1 line
2.15.0
#1 lore raw

PATCH 1/1 modutils: Dontaudit CAP_SYS_ADMIN checks for modprobe

Quoted 5 lines · Luis Ressel via refpolicy

The ttm module, a dependency of radeon/amdgpu, does some capable(CAP_SYS_ADMIN) checks. Changes in 4.13 have caused some of these checks to be executed during module initialization, in the context of modprobe, which fills the audit logs with a lot of denials.

Quoted 8 lines

Since failing these capable() checks is not an issue (they merely control the access to emergency memory reserves, which shouldn't be an issue during boot), I'm dontauditing them.

One potential issue with this is that if a module that actually needs CAP_SYS_ADMIN during initialization comes along later, the dontaudit is going to make the debugging a bit more annoying. Is anyone concerned about this?

I'm not concerned about debugging issues. Turning off dontaudits is well documented.

Quoted 18 lines
---
  policy/modules/system/modutils.te | 2 ++
  1 file changed, 2 insertions(+)
policy/modules/system/modutils.te +2 -0
index fe42b0f1d..5e66c4439 100644
@@ -37,6 +37,8 @@ ifdef(`init_systemd',`
 
  allow kmod_t self:capability { dac_override net_raw sys_nice sys_tty_config };
  allow kmod_t self:process { execmem sigchld sigkill sigstop signull signal };
+# for the radeon/amdgpu modules
+dontaudit kmod_t self:capability sys_admin;
 
  allow kmod_t self:udp_socket create_socket_perms;
  allow kmod_t self:rawip_socket create_socket_perms;
Signature · 1 line
Chris PeBenito
#2 lore raw

PATCH 1/1 modutils: Dontaudit CAP_SYS_ADMIN checks for modprobe

In reply to Luis Ressel
Quoted 22 lines · Luis Ressel via refpolicy

The ttm module, a dependency of radeon/amdgpu, does some capable(CAP_SYS_ADMIN) checks. Changes in 4.13 have caused some of these checks to be executed during module initialization, in the context of modprobe, which fills the audit logs with a lot of denials.

Since failing these capable() checks is not an issue (they merely control the access to emergency memory reserves, which shouldn't be an issue during boot), I'm dontauditing them.

One potential issue with this is that if a module that actually needs CAP_SYS_ADMIN during initialization comes along later, the dontaudit is going to make the debugging a bit more annoying. Is anyone concerned about this?

---
  policy/modules/system/modutils.te | 2 ++
  1 file changed, 2 insertions(+)
policy/modules/system/modutils.te +0 -0
index fe42b0f1d..5e66c4439 100644

policy/modules/system/modutils.te ifdef(`init_systemd',` · line 44

Quoted 8 lines
policy/modules/system/modutils.te +2 -0
@@ -37,6 +37,8 @@ ifdef(`init_systemd',`
 
  allow kmod_t self:capability { dac_override net_raw sys_nice sys_tty_config };
  allow kmod_t self:process { execmem sigchld sigkill sigstop signull signal };
+# for the radeon/amdgpu modules
+dontaudit kmod_t self:capability sys_admin;
 
  allow kmod_t self:udp_socket create_socket_perms;
  allow kmod_t self:rawip_socket create_socket_perms;

Merged.

Signature · 1 line
Chris PeBenito