# VERIFICATION FOCAL

Validation performed on a 6-core VM with 8Gb or RAM. The following stress-ng 
command was running throughout the test from the description:
# stress-ng --class memory --class vm --all 1 --timeout 96h

Afterwards, the udevadm test loop was executed as below:
# date; while /bin/true; do
    sudo udevadm control --reload-rules
    sudo udevadm trigger
    sudo udevadm settle --timeout=3
  done
Thu Apr 11 19:19:18 UTC 2024
...

A few minutes later, the errors started showing up on journald:
# journalctl --follow -b -u usbguard | grep -A2 "failed to read"
Apr 11 19:21:59 z-rotomvm34 usbguard-daemon[197214]: [1712863318.753] (E) 
ueventProcessRead: failed to read pending uevent: rc=-1 errno=105
Apr 11 19:21:59 z-rotomvm34 usbguard-daemon[197214]: [1712863318.755] (E) 
UEventDeviceManager thread: UEvent device manager: recvmsg: No buffer space 
available

..and usbguard became unresponsive.

This seems good indication that the reproducer is valid. I then upgraded
to the usbguard version from proposed and repeated the tests (plus
stress-ng workload). The VM has been running for many hours since then,
and journald indicates that we've triggered the ENOBUFS issues more than
a few times. usbguard-daemon continued chugging along and responding to
events, so we can mark this as verified.

Below are the verification logs.
###

$ dpkg -l | grep usbguard
ii  libusbguard0                          0.7.6+ds-1ubuntu1                 
amd64        USB device authorization policy framework - shared library
ii  usbguard                              0.7.6+ds-1ubuntu1                 
amd64        USB device authorization policy framework

$ date; while /bin/true; do
  sudo udevadm control --reload-rules
  sudo udevadm trigger
  sudo udevadm settle --timeout=3
done
Tue Apr 16 10:20:33 UTC 2024

# stress-ng --class memory --class vm --all 1 --timeout 96h

$ sudo journalctl -b -u usbguard | grep -A1 "failed to read"
Apr 16 13:40:40 z-rotomvm34 usbguard-daemon[712]: [1713274840.663] (E) 
ueventProcessRead: failed to read pending uevent (returning): rc=
-1 errno=105
Apr 16 13:40:40 z-rotomvm34 usbguard-daemon[712]: [1713274840.827] (A) uid=0 
pid=712 result='SUCCESS' device.rule='allow id 1d6b:0001 se
rial "0000:00:04.0" name "UHCI Host Controller" hash 
"sKXn6PthDDlGgdxZHdnlUQ9DROkH/YSojkBlfpcnsaU=" parent-hash 
"9Ii0Zm8Mvu2nYz9z/EgAXJ/ed6bLW8Ctv1iUD5rh6qY=" via-port "usb2" with-interface 
09:00:00 with-connect-type ""' 
device.system_name='/devices/pci0000:00/0000:00:04.0/usb2' type='Device.Present'
--
Apr 16 14:15:45 z-rotomvm34 usbguard-daemon[712]: [1713276945.707] (E) 
ueventProcessRead: failed to read pending uevent (returning): rc=-1 errno=105
Apr 16 14:15:45 z-rotomvm34 usbguard-daemon[712]: [1713276945.709] (A) uid=0 
pid=712 result='SUCCESS' device.rule='allow id 0627:0001 serial 
"28754-0000:00:04.7-1" name "QEMU USB Tablet" hash 
"74abnf32ZntGQv1XK1k5t/IqWo3wxePUnjpidwCzMk4=" parent-hash 
"CsKOZ6IY8v3eojsc1fqKDW84V+MMhD6HsjjojcZBjSg=" via-port "1-1" with-interface 
03:00:00 with-connect-type "unknown"' 
device.system_name='/devices/pci0000:00/0000:00:04.7/usb1/1-1' 
type='Device.Present'
--
Apr 16 14:43:09 z-rotomvm34 usbguard-daemon[712]: [1713278589.740] (E) 
ueventProcessRead: failed to read pending uevent (returning): rc=-1 errno=105
Apr 16 14:43:10 z-rotomvm34 usbguard-daemon[712]: [1713278590.573] (A) uid=0 
pid=712 result='SUCCESS' device.rule='allow id 1d6b:0001 serial "0000:00:04.0" 
name "UHCI Host Controller" hash "sKXn6PthDDlGgdxZHdnlUQ9DROkH/YSojkBlfpcnsaU=" 
parent-hash "9Ii0Zm8Mvu2nYz9z/EgAXJ/ed6bLW8Ctv1iUD5rh6qY=" via-port "usb2" 
with-interface 09:00:00 with-connect-type ""' 
device.system_name='/devices/pci0000:00/0000:00:04.0/usb2' type='Device.Present'


** Tags removed: verification-needed verification-needed-focal
** Tags added: verification-done verification-done-focal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1855189

Title:
  usbguard stops responding when recvmsg receives ENOBUFS

To manage notifications about this bug go to:
https://bugs.launchpad.net/usbguard/+bug/1855189/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to