Bug 1956032 - SELinux is preventing ebtables from 'read' accesses on the Datei ebtables.lock.
Summary: SELinux is preventing ebtables from 'read' accesses on the Datei ebtables.lock.
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 33
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:2e24891e4cb166984014cc4cba3...
Depends On:
TreeView+ depends on / blocked
Reported: 2021-05-02 08:57 UTC by Frank Büttner
Modified: 2021-05-03 14:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: ---

Attachments (Terms of Use)

Description Frank Büttner 2021-05-02 08:57:49 UTC
Description of problem:
SELinux is preventing ebtables from 'read' accesses on the Datei ebtables.lock.

*****  Plugin catchall (100. confidence) suggests   **************************

Wenn Sie denken, dass es ebtables standardmäßig erlaubt sein sollte, read Zugriff auf ebtables.lock file zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# ausearch -c 'ebtables' --raw | audit2allow -M my-ebtables
# semodule -X 300 -i my-ebtables.pp

Additional Information:
Source Context                system_u:system_r:firewalld_t:s0
Target Context                system_u:object_r:virt_var_run_t:s0
Target Objects                ebtables.lock [ file ]
Source                        ebtables
Source Path                   ebtables
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.6-36.fc33.noarch
Local Policy RPM              selinux-policy-targeted-3.14.6-36.fc33.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.11.16-200.fc33.x86_64 #1 SMP Wed
                              Apr 21 16:08:37 UTC 2021 x86_64 x86_64
Alert Count                   1
First Seen                    2021-05-02 10:56:58 CEST
Last Seen                     2021-05-02 10:56:58 CEST
Local ID                      a4522010-34c0-40a1-931d-84ccac001bf8

Raw Audit Messages
type=AVC msg=audit(1619945818.632:510): avc:  denied  { read } for  pid=11179 comm="ebtables" name="ebtables.lock" dev="tmpfs" ino=1853 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:virt_var_run_t:s0 tclass=file permissive=0

Hash: ebtables,firewalld_t,virt_var_run_t,file,read

Version-Release number of selected component:

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.11.16-200.fc33.x86_64
type:           libreport

Potential duplicate: bug 1747939

Comment 1 Zdenek Pytela 2021-05-03 11:08:40 UTC

The file in the setroubleshoot report has incorrect label. The path was not logged, but in the likely case it is /run, you can fix the label with

  # /sbin/restorecon -v /run/ebtables.lock

This change, however, does not persist boot. Are you aware how the lockfile was created?

Comment 2 Frank Büttner 2021-05-03 14:40:44 UTC
I have simple start the firewalld service after removing the iptables/ip6ables service.
An then the message was shown.

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