Skip to content

Commit

Permalink
Allow some confined users send to lldpad over a unix dgram socket
Browse files Browse the repository at this point in the history
Note this is for lldptool and vdptool connecting to the lldpad daemon
from the lldpad package - Intel LLDP Agent.

The commit addresses the following AVC denial example:
type=PROCTITLE msg=audit(10/24/2024 10:22:07.718:854) : proctitle=lldptool -p
type=SOCKADDR msg=audit(10/24/2024 10:22:07.718:854) : saddr={ saddr_fam=local path=/com/intel/lldpad }
type=SYSCALL msg=audit(10/24/2024 10:22:07.718:854) : arch=x86_64 syscall=connect success=no exit=EACCES(Permission denied) a0=0x3 a1=0x55c239a95312 a2=0x14 a3=0x0 items=0 ppid=10028 pid=10029 auid=user27128 uid=user27128 gid=user27128 euid=user27128 suid=user27128 fsuid=user27128 egid=user27128 sgid=user27128 fsgid=user27128 tty=pts3 ses=6 comm=lldptool exe=/usr/sbin/lldptool subj=staff_u:staff_r:staff_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(10/24/2024 10:22:07.718:854) : avc:  denied  { sendto } for  pid=10029 comm=lldptool path=/com/intel/lldpad scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:lldpad_t:s0 tclass=unix_dgram_socket permissive=0

Resolves: RHEL-58072
  • Loading branch information
zpytela committed Oct 24, 2024
1 parent e9ba5ad commit 008939d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions policy/modules/roles/staff.te
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ optional_policy(`
iotop_run(staff_t, staff_r)
')

optional_policy(`
lldpad_dgram_send(staff_t)
')

optional_policy(`
logadm_role_change(staff_r)
')
Expand Down
4 changes: 4 additions & 0 deletions policy/modules/roles/sysadm.te
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ optional_policy(`
libs_run_ldconfig(sysadm_t, sysadm_r)
')

optional_policy(`
lldpad_dgram_send(sysadm_t)
')

optional_policy(`
logrotate_run(sysadm_t, sysadm_r)
')
Expand Down
4 changes: 4 additions & 0 deletions policy/modules/roles/unprivuser.te
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ optional_policy(`
irc_role(user_r, user_t)
')

optional_policy(`
lldpad_dgram_send(user_t)
')

optional_policy(`
oident_manage_user_content(user_t)
oident_relabel_user_content(user_t)
Expand Down

0 comments on commit 008939d

Please sign in to comment.