Bug 1898800 - SELinux is preventing systemd-resolve from 'create' accesses on the lnk_file .#stub-resolv.conf0e7c3c1bedd8d0aa.
Summary: SELinux is preventing systemd-resolve from 'create' accesses on the lnk_file ...
Keywords:
Status: CLOSED DUPLICATE of bug 1896796
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 33
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:3a40970197403cf064490e54bc9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-18 04:57 UTC by gorkodashvili1
Modified: 2020-12-08 15:10 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-08 15:10:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description gorkodashvili1 2020-11-18 04:57:34 UTC
Description of problem:
Because of conflict between dnsmasq and systemd-resolved I have in the following line in /etc/systemd/resolved.conf
DNSStubListener=no
This is a big problem since it prevents my podman containers to start:
Error: unable to start container "whatever": error creating resolv.conf for container whatever: lstat /etc/../run/systemd/resolve/stub-resolv.conf: no such file or directory
SELinux is preventing systemd-resolve from 'create' accesses on the lnk_file .#stub-resolv.conf0e7c3c1bedd8d0aa.

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

If you believe that systemd-resolve should be allowed create access on the .#stub-resolv.conf0e7c3c1bedd8d0aa lnk_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'systemd-resolve' --raw | audit2allow -M my-systemdresolve
# semodule -X 300 -i my-systemdresolve.pp

Additional Information:
Source Context                system_u:system_r:systemd_resolved_t:s0
Target Context                system_u:object_r:systemd_resolved_var_run_t:s0
Target Objects                .#stub-resolv.conf0e7c3c1bedd8d0aa [ lnk_file ]
Source                        systemd-resolve
Source Path                   systemd-resolve
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            <Unknown>
Local Policy RPM              selinux-policy-targeted-3.14.6-30.fc33.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.9.8-200.fc33.x86_64 #1 SMP Tue
                              Nov 10 21:58:19 UTC 2020 x86_64 x86_64
Alert Count                   12
First Seen                    2020-11-17 12:10:04 +04
Last Seen                     2020-11-18 08:50:01 +04
Local ID                      8ec73e3a-1dd2-4665-9c55-c653288dbc03

Raw Audit Messages
type=AVC msg=audit(1605675001.250:1731): avc:  denied  { create } for  pid=5053 comm="systemd-resolve" name=".#stub-resolv.conf0e7c3c1bedd8d0aa" scontext=system_u:system_r:systemd_resolved_t:s0 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=lnk_file permissive=0


Hash: systemd-resolve,systemd_resolved_t,systemd_resolved_var_run_t,lnk_file,create


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

Comment 1 Thomas Köller 2020-12-04 12:18:30 UTC
Similar problem has been detected:

Happens during systemd startup.

hashmarkername: setroubleshoot
kernel:         5.9.11-200.fc33.x86_64
package:        selinux-policy-targeted-3.14.6-30.fc33.noarch
reason:         SELinux is preventing systemd-resolve from 'create' accesses on the lnk_file .#stub-resolv.confc6c1c62729778544.
type:           libreport

Comment 2 Zdenek Pytela 2020-12-08 15:10:09 UTC

*** This bug has been marked as a duplicate of bug 1896796 ***


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