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 1582205 - usbmuxd triggers SELinux violation, simply reading
Summary: usbmuxd triggers SELinux violation, simply reading
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.5
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-24 14:11 UTC by R P Herrold
Modified: 2019-04-29 09:18 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-203.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:04:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3111 0 None None None 2018-10-30 10:04:48 UTC

Description R P Herrold 2018-05-24 14:11:45 UTC
Description of problem:
usbmuxd triggers SELinux violation, simply reading

Version-Release number of selected component (if applicable):
usbmuxd-1.1.0-1

How reproducible:
1. run updates
2. plug in a Google Pixel 2 Xl


Steps to Reproduce:
alert occurs

Actual results:
SELinux is preventing /usr/sbin/usbmuxd from read access on the file +usb:2-6:1.0.

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

If you believe that usbmuxd should be allowed read access on the +usb:2-6:1.0 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 'usbmuxd' --raw | audit2allow -M my-usbmuxd
# semodule -i my-usbmuxd.pp

Additional Information:
Source Context                system_u:system_r:usbmuxd_t:s0
Target Context                system_u:object_r:udev_var_run_t:s0
Target Objects                +usb:2-6:1.0 [ file ]
Source                        usbmuxd
Source Path                   /usr/sbin/usbmuxd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-192.el7_5.3.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux centos-7.first.owlriver.net
                              3.10.0-862.2.3.el7.x86_64 #1 SMP Wed May 9
                              18:05:47 UTC 2018 x86_64 x86_64
Alert Count                   52
First Seen                    2018-05-11 10:48:49 EDT
Last Seen                     2018-05-24 09:58:17 EDT
Local ID                      eda232f7-434c-489d-b94a-cfd9f97c0db2

Raw Audit Messages
type=AVC msg=audit(1527170297.164:18648): avc:  denied  { read } for  pid=22670 comm="usbmuxd" name="+usb:2-6:1.0" dev="tmpfs" ino=8097902 scontext=system_u:system_r:usbmuxd_t:s0 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file

The relevant device is:
[503238.045037] usb 2-6: new high-speed USB device number 16 using ehci-pci
[503238.162662] usb 2-6: New USB device found, idVendor=18d1, idProduct=4ee1
[503238.162667] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[503238.162671] usb 2-6: Product: Pixel 2 XL
[503238.162673] usb 2-6: Manufacturer: Google
[503238.162676] usb 2-6: SerialNumber: 710KPUU0171670
[root@centos-7 selinux]# 



Expected results:
no SELinux alerton a mere read

Additional info:
suggested rule was:

[root@centos-7 selinux]# cat my-usbmuxd.te

module my-usbmuxd 1.0;

require {
        type usbmuxd_t;
        type udev_var_run_t;
        class file read;
}

#============= usbmuxd_t ==============
allow usbmuxd_t udev_var_run_t:file read;
[root@centos-7 selinux]#

Comment 2 Lukas Vrabec 2018-05-25 10:12:45 UTC
Fix in fedora: 697cbe8643

Comment 3 R P Herrold 2018-06-11 14:42:51 UTC
I have a repetition of this:

SELinux is preventing /usr/sbin/usbmuxd from 'open' accesses on the file /run/udev/data/+usb:2-0:1.0.

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

If you believe that usbmuxd should be allowed open access on the +usb:2-0:1.0 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 'usbmuxd' --raw | audit2allow -M my-usbmuxd
# semodule -i my-usbmuxd.pp

Additional Information:
Source Context                system_u:system_r:usbmuxd_t:s0
Target Context                system_u:object_r:udev_var_run_t:s0
Target Objects                /run/udev/data/+usb:2-0:1.0 [ file ]
Source                        usbmuxd
Source Path                   /usr/sbin/usbmuxd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           usbmuxd-1.1.0-1.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-192.el7_5.3.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.0-862.3.2.el7.x86_64 #1 SMP
                              Mon May 21 23:36:36 UTC 2018 x86_64 x86_64
Alert Count                   19
First Seen                    2018-05-24 17:54:05 EDT
Last Seen                     2018-05-29 10:10:36 EDT
Local ID                      7c5b1722-84cd-4045-a14c-391e82363d59

Raw Audit Messages
type=AVC msg=audit(1527603036.84:107): avc:  denied  { open } for  pid=712 comm="usbmuxd" path="/run/udev/data/+usb:2-0:1.0" dev="tmpfs" ino=13288 scontext=system_u:system_r:usbmuxd_t:s0 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1527603036.84:107): arch=x86_64 syscall=open success=no exit=EACCES a0=7ffc84f2f080 a1=80000 a2=1b6 a3=24 items=0 ppid=1 pid=712 auid=4294967295 uid=113 gid=113 euid=113 suid=113 fsuid=113 egid=113 sgid=113 fsgid=113 tty=(none) ses=4294967295 comm=usbmuxd exe=/usr/sbin/usbmuxd subj=system_u:system_r:usbmuxd_t:s0 key=(null)

Hash: usbmuxd,usbmuxd_t,udev_var_run_t,file,open


==================

what SRPM level contains the fix, so I might build and apply it?

Thank you

-- Russ herrold

Comment 7 errata-xmlrpc 2018-10-30 10:04:11 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, 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-2018:3111


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