Public bug reported:
Package: `systemd`
Series: Ubuntu 26.04 LTS (Resolute)
## Impact
On Ubuntu 26.04 with systemd 259.5, some USB HID devices are unusable in
Wayland sessions when their firmware reports an invalid serial number.
The kernel exposes the serial as `UNIQ`/`HID_UNIQ`. systemd rejects the entire
uevent file if this value contains control characters, invalid UTF-8, or
Unicode non-characters. udev then fails to create a complete database record,
causing logind's `TakeDevice` call to return `ENODEV`. Wayland compositors such
as sway, KWin, and Mutter consequently cannot open the input device.
Known affected devices include:
- Contour Design RollerMouse Red Plus receiver (`0b33:2000`)
- ASUS ROG Azoth wireless keyboard
- Mad Catz RAT4 mouse (`0738:1731`)
The proposed fix is upstream commit `8eede71`, merged in systemd PR #43061.
It ignores only the invalid property instead of rejecting the complete uevent
file. Upstream has backported the fix to maintained stable branches, including
v259.
## Test Plan
Testing must use Ubuntu's stock `usbhid` module, without a local kernel
workaround.
1. Boot Ubuntu 26.04 with the currently released systemd and connect an
affected device.
2. Locate its input parent under `/sys/class/input/inputN` and verify that its
`uevent` contains the invalid `UNIQ` value:
od -An -tx1 -v /sys/class/input/inputN/uevent
3. Run:
sudo udevadm test /sys/class/input/inputN
Before the fix, sd-device reports invalid characters and refuses the
uevent file. The device may lack `/run/udev/data/+input:inputN`, and the
compositor/logind logs show `ENODEV` or failure to open the event device.
4. Install the proposed packages and reboot with the device connected:
sudo apt install -t resolute-proposed systemd udev libsystemd0
5. Repeat the checks. Verify that:
- only the invalid `UNIQ`/`HID_UNIQ` property is ignored;
- other properties are retained;
- `/run/udev/data/+input:inputN` exists;
- `udevadm info` succeeds;
- logind no longer returns `ENODEV`;
- the device works at login and in a Wayland session.
6. Test USB input devices with a valid serial and with no serial. Confirm both
continue to initialize normally and valid serial properties are preserved.
7. Confirm that the systemd autopkgtests introduce no new failures.
## Where problems could occur
The changed parser is used for kernel uevent files across many device types.
If filtering is too permissive, unsafe values could enter the udev database or
logs. If it is too strict, valid properties following an invalid property
could be lost, potentially affecting device permissions, tags, symlinks, or
initialization.
The upstream fix retains validation for each individual key/value pair and
only removes whole-file rejection. Regression testing should confirm that
unsafe values remain excluded, valid properties after them are retained, and
diagnostic output escapes unsafe characters. Block, USB, and input device
initialization should be covered by the package tests.
## Other Info
Upstream reports:
- https://github.com/systemd/systemd/issues/41296
- https://github.com/systemd/systemd/issues/41339
- https://github.com/systemd/systemd/issues/43008
Exact fix:
- https://github.com/systemd/systemd/pull/43061
- https://github.com/systemd/systemd/commit/8eede71
PR #42316 addressed invalid properties added through udev rules but did not
fix rejection of a complete kernel uevent file. PR #43061 is the fix for the
`UNIQ`/`HID_UNIQ` path described here.
Suggested packaging change: cherry-pick the v259-stable backport of commit
`8eede71` into the Resolute systemd package and reference the Launchpad bug in
`debian/changelog` as `LP: #NNNNNN`.
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164541
Title:
Invalid USB HID UNIQ property causes logind TakeDevice to fail with
ENODEV
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2164541/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs