This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2149625 - usbguard tries to access non-existent device path
Summary: usbguard tries to access non-existent device path
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: usbguard
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Attila Lakatos
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-30 12:42 UTC by Dalibor Pospíšil
Modified: 2023-08-03 12:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-03 12:48:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-941 0 None Migrated None 2023-08-03 12:48:48 UTC
Red Hat Issue Tracker RHELPLAN-140885 0 None None None 2022-11-30 12:57:48 UTC
Red Hat Issue Tracker SECENGSP-4905 0 None None None 2022-11-30 12:57:51 UTC

Description Dalibor Pospíšil 2022-11-30 12:42:00 UTC
Description of problem:
Usbguard tries to access non-existent device path during the system boot.

Version-Release number of selected component (if applicable):
usbguard-1.0.0-12.el9.x86_64
usbguard-1.0.0-8.el8_7.2.x86_64

How reproducible:
100% at least in the libvirt VM

Steps to Reproduce:
1. systemctl enable usbguard
2. reboot
3. journalctl -u usbguard

Actual results:
Nov 30 13:17:03 sopos-rhel9-brq systemd[1]: Starting USBGuard daemon...
Nov 30 13:17:04 sopos-rhel9-brq systemd[1]: Started USBGuard daemon.
Nov 30 13:17:04 sopos-rhel9-brq usbguard-daemon[745]: uid=0 pid=740 result='SUCCESS' device.rule='allow id 1d6b:0002 serial "0000:02:00.0" name "xHCI Host Controller" hash "4+i1fOQzh6/Cdbdfiwr>
Nov 30 13:17:04 sopos-rhel9-brq usbguard-daemon[745]: uid=0 pid=740 result='SUCCESS' device.system_name='/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1' target.new='allow' device.rule='all>
Nov 30 13:17:04 sopos-rhel9-brq usbguard-daemon[745]: uid=0 pid=740 result='SUCCESS' device.rule='allow id 1d6b:0003 serial "0000:02:00.0" name "xHCI Host Controller" hash "kMlilF7kSjfNYbDD2q8>
Nov 30 13:17:04 sopos-rhel9-brq usbguard-daemon[745]: uid=0 pid=740 result='SUCCESS' device.system_name='/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb2' target.new='allow' device.rule='all>
Nov 30 13:17:04 sopos-rhel9-brq usbguard-daemon[745]: uid=0 pid=740 result='SUCCESS' device.rule='allow id 0627:0001 serial "28754-0000:00:02.1:00.0-1" name "QEMU USB Tablet" hash "9f6ZIqpK5OG>
Nov 30 13:17:04 sopos-rhel9-brq usbguard-daemon[745]: uid=0 pid=740 result='SUCCESS' device.system_name='/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1' target.new='block' device.rule=>
Nov 30 13:17:04 sopos-rhel9-brq usbguard-daemon[745]: Cannot resolve realpath for /sys/bus/usb/devices/../../../devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1/1-1:1.0
Nov 30 13:17:04 sopos-rhel9-brq usbguard-daemon[745]: Ignoring unknown UEvent action: sysfs_devpath=/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1 action=change

Expected results:
no attempt to access non-existent path logged

Additional info:
the last path component does not exist
[root@sopos-rhel9-brq ~]# ls -l /sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1/
total 0
-rw-r--r--. 1 root root  4096 Nov 30 13:17 authorized
-rw-r--r--. 1 root root  4096 Nov 30 13:27 avoid_reset_quirk
-r--r--r--. 1 root root  4096 Nov 30 13:16 bcdDevice
-rw-r--r--. 1 root root  4096 Nov 30 13:27 bConfigurationValue
-r--r--r--. 1 root root  4096 Nov 30 13:16 bDeviceClass
-r--r--r--. 1 root root  4096 Nov 30 13:27 bDeviceProtocol
-r--r--r--. 1 root root  4096 Nov 30 13:27 bDeviceSubClass
-r--r--r--. 1 root root  4096 Nov 30 13:27 bmAttributes
-r--r--r--. 1 root root  4096 Nov 30 13:27 bMaxPacketSize0
-r--r--r--. 1 root root  4096 Nov 30 13:27 bMaxPower
-r--r--r--. 1 root root  4096 Nov 30 13:27 bNumConfigurations
-r--r--r--. 1 root root  4096 Nov 30 13:27 bNumInterfaces
-r--r--r--. 1 root root  4096 Nov 30 13:27 busnum
-r--r--r--. 1 root root  4096 Nov 30 13:27 configuration
-r--r--r--. 1 root root 65553 Nov 30 13:16 descriptors
-r--r--r--. 1 root root  4096 Nov 30 13:27 dev
-r--r--r--. 1 root root  4096 Nov 30 13:27 devnum
-r--r--r--. 1 root root  4096 Nov 30 13:27 devpath
lrwxrwxrwx. 1 root root     0 Nov 30 13:16 driver -> ../../../../../../bus/usb/drivers/usb
drwxr-xr-x. 3 root root     0 Nov 30 13:25 ep_00
-r--r--r--. 1 root root  4096 Nov 30 13:16 idProduct
-r--r--r--. 1 root root  4096 Nov 30 13:16 idVendor
-r--r--r--. 1 root root  4096 Nov 30 13:27 ltm_capable
-r--r--r--. 1 root root  4096 Nov 30 13:16 manufacturer
-r--r--r--. 1 root root  4096 Nov 30 13:27 maxchild
lrwxrwxrwx. 1 root root     0 Nov 30 13:17 port -> ../1-0:1.0/usb1-port1
drwxr-xr-x. 2 root root     0 Nov 30 13:16 power
-r--r--r--. 1 root root  4096 Nov 30 13:16 product
-r--r--r--. 1 root root  4096 Nov 30 13:27 quirks
-r--r--r--. 1 root root  4096 Nov 30 13:27 removable
--w-------. 1 root root  4096 Nov 30 13:27 remove
-r--r--r--. 1 root root  4096 Nov 30 13:27 rx_lanes
-r--r--r--. 1 root root  4096 Nov 30 13:16 serial
-r--r--r--. 1 root root  4096 Nov 30 13:27 speed
lrwxrwxrwx. 1 root root     0 Nov 30 13:16 subsystem -> ../../../../../../bus/usb
-r--r--r--. 1 root root  4096 Nov 30 13:27 tx_lanes
-rw-r--r--. 1 root root  4096 Nov 30 13:16 uevent
-r--r--r--. 1 root root  4096 Nov 30 13:27 urbnum
-r--r--r--. 1 root root  4096 Nov 30 13:27 version


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