Skip to content

Commit

Permalink
Allow iio-sensor-proxy the bpf capability
Browse files Browse the repository at this point in the history
The commit addresses the following AVC denial:
type=PROCTITLE msg=audit(10/11/2024 15:01:06.998:7494) : proctitle=/usr/libexec/iio-sensor-proxy
type=SYSCALL msg=audit(10/11/2024 15:01:06.998:7494) : arch=x86_64 syscall=setsockopt success=yes exit=0 a0=0x7 a1=SOL_SOCKET a2=SO_ATTACH_FILTER a3=0x7ffe8852ca40 items=0 ppid=1 pid=215132 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=iio-sensor-prox exe=/usr/libexec/iio-sensor-proxy subj=system_u:system_r:iiosensorproxy_t:s0 key=(null)
type=AVC msg=audit(10/11/2024 15:01:06.998:7494) : avc:  denied  { sys_admin } for  pid=215132 comm=iio-sensor-prox capability=sys_admin  scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=capability permissive=0
type=AVC msg=audit(10/11/2024 15:01:06.998:7494) : avc:  denied  { bpf } for  pid=215132 comm=iio-sensor-prox capability=bpf  scontext=system_u:system_r:iiosensorproxy_t:s0 tcontext=system_u:system_r:iiosensorproxy_t:s0 tclass=capability2 permissive=0

Resolves: RHEL-17346
  • Loading branch information
zpytela committed Oct 11, 2024
1 parent 8663090 commit d2260f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions policy/modules/contrib/iiosensorproxy.te
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ type iiosensorproxy_t;
type iiosensorproxy_exec_t;
init_daemon_domain(iiosensorproxy_t, iiosensorproxy_exec_t)

allow iiosensorproxy_t self:capability sys_admin;
allow iiosensorproxy_t self:capability2 bpf;
allow iiosensorproxy_t self:netlink_kobject_uevent_socket create_socket_perms;

dev_read_sysfs(iiosensorproxy_t)
Expand Down

0 comments on commit d2260f7

Please sign in to comment.