Bug 1372962 - SELinux is preventing mount from 'unlink' accesses on the file utab.
Summary: SELinux is preventing mount from 'unlink' accesses on the file utab.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker abrt_hash:1f55b8ccf34...
Depends On:
Blocks: F25BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2016-09-04 11:38 UTC by Mikhail
Modified: 2016-09-21 00:35 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-3.13.1-214.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-21 00:35:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikhail 2016-09-04 11:38:49 UTC
Description of problem:
SELinux is preventing mount from 'unlink' accesses on the file utab.

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

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

Additional Information:
Source Context                system_u:system_r:udisks2_t:s0
Target Context                system_u:object_r:mount_var_run_t:s0
Target Objects                utab [ file ]
Source                        mount
Source Path                   mount
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-211.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed)
                              4.8.0-0.rc4.git0.1.fc25.x86_64+debug #1 SMP Mon
                              Aug 29 19:06:48 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-09-04 16:37:32 YEKT
Last Seen                     2016-09-04 16:37:32 YEKT
Local ID                      8dce032c-49bf-4110-aed3-7136b0cd4435

Raw Audit Messages
type=AVC msg=audit(1472989052.535:323): avc:  denied  { unlink } for  pid=12037 comm="mount" name="utab" dev="tmpfs" ino=1376 scontext=system_u:system_r:udisks2_t:s0 tcontext=system_u:object_r:mount_var_run_t:s0 tclass=file permissive=1


Hash: mount,udisks2_t,mount_var_run_t,file,unlink

Version-Release number of selected component:
selinux-policy-3.13.1-211.fc25.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.8.0-0.rc4.git0.1.fc25.x86_64+debug
type:           libreport

Comment 1 pavel raur 2016-09-15 08:59:34 UTC
Looks like the same problem. Happened when I tried to mount or unmount dvd.


SELinux is preventing mount from lock access on the file /run/mount/utab.lock.

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

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


Additional Information:
Source Context                system_u:system_r:udisks2_t:s0
Target Context                system_u:object_r:mount_var_run_t:s0
Target Objects                /run/mount/utab.lock [ file ]
Source                        mount
Source Path                   mount
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-211.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     dhcp-28-138.brq.redhat.com
Platform                      Linux dhcp-28-138.brq.redhat.com
                              4.8.0-0.rc6.git0.1.fc25.x86_64 #1 SMP Mon Sep 12
                              19:16:54 UTC 2016 x86_64 x86_64
Alert Count                   3
First Seen                    2016-09-15 10:20:10 CEST
Last Seen                     2016-09-15 10:24:08 CEST
Local ID                      db528475-0cfc-4c7a-9b83-23a06a35df20

Raw Audit Messages
type=AVC msg=audit(1473927848.573:296): avc:  denied  { lock } for  pid=2781 comm="mount" path="/run/mount/utab.lock" dev="tmpfs" ino=34245 scontext=system_u:system_r:udisks2_t:s0 tcontext=system_u:object_r:mount_var_run_t:s0 tclass=file permissive=1


Hash: mount,udisks2_t,mount_var_run_t,file,lock


I can't mount dvd and usbdisk if selinux is not in Permissive mode.

I propose this as betablocker, its violating this criteria:

"Automatic mounting of removable media on insertion must work in release-blocking desktops."

Comment 3 Fedora Update System 2016-09-15 17:21:53 UTC
selinux-policy-3.13.1-214.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5f88bebc7c

Comment 4 Fedora Update System 2016-09-16 01:23:00 UTC
selinux-policy-3.13.1-214.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5f88bebc7c

Comment 5 Petr Schindler 2016-09-19 16:34:18 UTC
Discussed at 2016-09-19 blocker review meeting: [1]. 

This bug was accepted as Beta blocker: This bug violates "Automatic mounting of removable media on insertion must work in release-blocking desktops."

[1] https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2016-09-19/

Comment 6 Fedora Update System 2016-09-21 00:35:53 UTC
selinux-policy-3.13.1-214.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, 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.