RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1991029 - SELinux is preventing /usr/sbin/lldpd from {search and create} access on the directory /var/agentx/master.
Summary: SELinux is preventing /usr/sbin/lldpd from {search and create} access on the ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: 8.6
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-06 20:19 UTC by Alena
Modified: 2022-05-10 16:22 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.14.3-86.el8
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 2033315 (view as bug list)
Environment:
Last Closed: 2022-05-10 15:15:05 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-92784 0 None None None 2021-08-06 20:21:55 UTC
Red Hat Product Errata RHBA-2022:1995 0 None None None 2022-05-10 15:15:23 UTC

Comment 3 Milos Malik 2021-12-16 10:24:50 UTC
The following SELinux denial appears in enforcing mode:
----
type=PROCTITLE msg=audit(12/16/2021 05:21:24.716:329) : proctitle=/usr/sbin/lldpd -x 
type=PATH msg=audit(12/16/2021 05:21:24.716:329) : item=0 name=/var/agentx/master nametype=UNKNOWN cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(12/16/2021 05:21:24.716:329) : cwd=/ 
type=SOCKADDR msg=audit(12/16/2021 05:21:24.716:329) : saddr={ saddr_fam=local path=/var/agentx/master } 
type=SYSCALL msg=audit(12/16/2021 05:21:24.716:329) : arch=x86_64 syscall=connect success=no exit=EACCES(Permission denied) a0=0x7 a1=0x55dff95e3980 a2=0x6e a3=0x0 items=1 ppid=1 pid=5978 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=lldpd exe=/usr/sbin/lldpd subj=system_u:system_r:lldpad_t:s0 key=(null) 
type=AVC msg=audit(12/16/2021 05:21:24.716:329) : avc:  denied  { search } for  pid=5978 comm=lldpd name=agentx dev="vda1" ino=41943497 scontext=system_u:system_r:lldpad_t:s0 tcontext=system_u:object_r:snmpd_var_lib_t:s0 tclass=dir permissive=0 
----

The second SELinux denial mentioned in comment#0 is already addressed in BZ#2028379.

Comment 4 Milos Malik 2021-12-16 10:27:56 UTC
Following SELinux denials appear in permissive mode:
----
type=PROCTITLE msg=audit(12/16/2021 05:26:21.733:353) : proctitle=/usr/sbin/lldpd -x 
type=PATH msg=audit(12/16/2021 05:26:21.733:353) : item=0 name=/var/agentx/master inode=41943498 dev=fd:01 mode=socket,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:snmpd_var_lib_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(12/16/2021 05:26:21.733:353) : cwd=/ 
type=SOCKADDR msg=audit(12/16/2021 05:26:21.733:353) : saddr={ saddr_fam=local path=/var/agentx/master } 
type=SYSCALL msg=audit(12/16/2021 05:26:21.733:353) : arch=x86_64 syscall=connect success=yes exit=0 a0=0x7 a1=0x55ddf5046980 a2=0x6e a3=0x0 items=1 ppid=1 pid=6019 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=lldpd exe=/usr/sbin/lldpd subj=system_u:system_r:lldpad_t:s0 key=(null) 
type=AVC msg=audit(12/16/2021 05:26:21.733:353) : avc:  denied  { connectto } for  pid=6019 comm=lldpd path=/var/agentx/master scontext=system_u:system_r:lldpad_t:s0 tcontext=system_u:system_r:snmpd_t:s0 tclass=unix_stream_socket permissive=1 
type=AVC msg=audit(12/16/2021 05:26:21.733:353) : avc:  denied  { write } for  pid=6019 comm=lldpd name=master dev="vda1" ino=41943498 scontext=system_u:system_r:lldpad_t:s0 tcontext=system_u:object_r:snmpd_var_lib_t:s0 tclass=sock_file permissive=1 
type=AVC msg=audit(12/16/2021 05:26:21.733:353) : avc:  denied  { search } for  pid=6019 comm=lldpd name=agentx dev="vda1" ino=41943497 scontext=system_u:system_r:lldpad_t:s0 tcontext=system_u:object_r:snmpd_var_lib_t:s0 tclass=dir permissive=1 
----

# rpm -qa selinux\*
selinux-policy-3.14.3-85.el8.noarch
selinux-policy-targeted-3.14.3-85.el8.noarch
#

Comment 6 Zdenek Pytela 2022-01-03 11:38:00 UTC
I've submitted a Fedora PR to address the issue:
https://github.com/fedora-selinux/selinux-policy/pull/982

Comment 7 Zdenek Pytela 2022-01-03 14:13:00 UTC
To backport:
commit e7f00c5591082ab84c055ba250b361eefa19eb0d (HEAD -> rawhide, upstream/rawhide)
Author: Zdenek Pytela <zpytela>
Date:   Mon Jan 3 12:27:28 2022 +0100

    Allow lldpd connect to snmpd with a unix domain stream socket

Comment 8 Zdenek Pytela 2022-01-03 14:37:29 UTC
https://gitlab.cee.redhat.com/SELinux/selinux-policy/-/commit/1d86c82abf7dfb9d30a00ceefc50a5040b468c87?merge_request_iid=405
commit 1d86c82abf7dfb9d30a00ceefc50a5040b468c87 (HEAD -> rhel8.6-contrib, upstream/rhel8.6-contrib, origin/rhel8.6-contrib)
Author: Zdenek Pytela <zpytela>
Date:   Mon Jan 3 12:27:28 2022 +0100

    Allow lldpd connect to snmpd with a unix domain stream socket

    If the lldpd service is configured to enable the SNMP subagent
    (using the -x option), the lldpd process tries to connect to snmpd's
    agentx. By default, the /var/agentx/master socket file is used.

    Addresses the following AVC denial:

    type=PROCTITLE msg=audit(01/03/22 06:21:57.359:417) : proctitle=/usr/sbin/lldpd -x
    type=PATH msg=audit(01/03/22 06:21:57.359:417) : item=0 name=/var/agentx/master nametype=UNKNOWN cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
    type=CWD msg=audit(01/03/22 06:21:57.359:417) : cwd=/
    type=SOCKADDR msg=audit(01/03/22 06:21:57.359:417) : saddr={ saddr_fam=local path=/var/agentx/master }
    type=SYSCALL msg=audit(01/03/22 06:21:57.359:417) : arch=x86_64 syscall=connect success=no exit=EACCES(Permission denied) a0=0x6 a1=0x5586e8de9980 a2=0x6e a3=0x0 items=1 ppid=1 pid=12595 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=lldpd exe=/usr/sbin/lldpd subj=system_u:system_r:lldpad_t:s0 key=(null)
    type=AVC msg=audit(01/03/22 06:21:57.359:417) : avc:  denied  { search } for  pid=12595 comm=lldpd name=agentx dev="vda1" ino=2034987 scontext=system_u:system_r:lldpad_t:s0 tcontext=system_u:object_r:snmpd_var_lib_t:s0 tclass=dir permissive=0
    
    Resolves: rhbz#1991029

Comment 16 errata-xmlrpc 2022-05-10 15:15:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (selinux-policy bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1995


Note You need to log in before you can comment on or make changes to this bug.