Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2139199 - SELinux is preventing dnsdomainname from 'search' accesses on the directory net.
Summary: SELinux is preventing dnsdomainname from 'search' accesses on the directory net.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: smartmontools
Version: 37
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6a8cc76373456abcf4eafcc1558...
: 2152700 2152983 2189938 2221346 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-01 19:43 UTC by Ignacio Conde
Modified: 2023-08-17 00:33 UTC (History)
5 users (show)

Fixed In Version: martmontools-7.3-7 smartmontools-7.3-9.fc38 smartmontools-7.4-1.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-30 01:38:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ignacio Conde 2022-11-01 19:43:11 UTC
Description of problem:
SELinux is preventing dnsdomainname from 'search' accesses on the directory net.

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

If you believe that dnsdomainname should be allowed search access on the net directory 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 'dnsdomainname' --raw | audit2allow -M my-dnsdomainname
# semodule -X 300 -i my-dnsdomainname.pp

Additional Information:
Source Context                system_u:system_r:fsdaemon_t:s0
Target Context                system_u:object_r:sysctl_net_t:s0
Target Objects                net [ dir ]
Source                        dnsdomainname
Source Path                   dnsdomainname
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-37.12-2.fc37.noarch
Local Policy RPM              smartmontools-selinux-7.3-3.fc37.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.19.16-301.fc37.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Fri Oct 21 15:55:37 UTC 2022
                              x86_64 x86_64
Alert Count                   6
First Seen                    2022-11-01 09:34:27 -03
Last Seen                     2022-11-01 16:21:43 -03
Local ID                      42bf0b65-505d-435a-86cb-ad1b34a72af3

Raw Audit Messages
type=AVC msg=audit(1667330503.271:213): avc:  denied  { search } for  pid=2109 comm="dnsdomainname" name="net" dev="proc" ino=20964 scontext=system_u:system_r:fsdaemon_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir permissive=0


Hash: dnsdomainname,fsdaemon_t,sysctl_net_t,dir,search

Version-Release number of selected component:
selinux-policy-targeted-37.12-2.fc37.noarch

Additional info:
component:      smartmontools
reporter:       libreport-2.17.4
hashmarkername: setroubleshoot
kernel:         5.19.16-301.fc37.x86_64
type:           libreport

Comment 1 b.gatessucks 2022-11-19 13:21:38 UTC
Similar problem has been detected:

Updated Fedora from 36 to 37 via dnf.
Rebooted.
Logged in.

hashmarkername: setroubleshoot
kernel:         6.0.8-300.fc37.x86_64
package:        selinux-policy-targeted-37.14-1.fc37.noarch
reason:         SELinux is preventing dnsdomainname from 'search' accesses on the directory /var/lib/snapd/snap/gnome-42-2204/29/usr/share/mime/application/gnunet-directory.xml.
type:           libreport

Comment 2 b.gatessucks 2022-12-08 18:38:17 UTC
Similar problem has been detected:

Booted
Logged in

hashmarkername: setroubleshoot
kernel:         6.0.11-300.fc37.x86_64
package:        selinux-policy-targeted-37.15-1.fc37.noarch
reason:         SELinux is preventing dnsdomainname from 'search' accesses on the directory net.
type:           libreport

Comment 3 Michal Hlavinka 2023-07-18 20:55:07 UTC
*** Bug 2152700 has been marked as a duplicate of this bug. ***

Comment 4 Michal Hlavinka 2023-07-18 20:55:15 UTC
*** Bug 2152983 has been marked as a duplicate of this bug. ***

Comment 5 Michal Hlavinka 2023-07-18 20:55:28 UTC
*** Bug 2189938 has been marked as a duplicate of this bug. ***

Comment 6 Michal Hlavinka 2023-07-20 21:27:27 UTC
smartmontools got significant selinux change. Previously, notification script has been run with same selinux context as smartd itself. Now it has its own selinux context, so they are more independent of each other. New selinux context should work with both distribution notify file smartdnotify and upstream's smartd_warn.sh script.

Comment 7 Michal Hlavinka 2023-07-24 22:27:57 UTC
*** Bug 2221346 has been marked as a duplicate of this bug. ***

Comment 8 Fedora Update System 2023-07-24 22:28:46 UTC
FEDORA-2023-b0cd579153 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-b0cd579153

Comment 9 Fedora Update System 2023-07-24 22:28:47 UTC
FEDORA-2023-02044826b2 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-02044826b2

Comment 10 Fedora Update System 2023-07-25 17:23:44 UTC
FEDORA-2023-b0cd579153 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-b0cd579153`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-b0cd579153

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-07-25 19:03:53 UTC
FEDORA-2023-02044826b2 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-02044826b2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-02044826b2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-07-30 01:38:58 UTC
FEDORA-2023-b0cd579153 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2023-08-02 01:38:27 UTC
FEDORA-2023-027b050610 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-027b050610`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-027b050610

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2023-08-17 00:33:43 UTC
FEDORA-2023-027b050610 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


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