AZL-117890: CVE-2026-142990 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
usb: usbtest: prevent divide by zero in simpleio() with zero length
A divide error oops was observed in simpleio():
usbtest 1-1:1.0: TEST 3: write/1 0..0 bytes 16307 times Oops: divide error: 0000 [#1] SMP KASAN RIP: 0010:simpleio+0x2c4/0x540 drivers/usb/misc/usbtest.c:497
The variable-length tests (test 3 and test 4) compute the next URB size with "len %= max", where max is the original urb->transferbufferlength. However, when a zero-length transfer is requested (param->length == 0), simpleallocurb() still returns a valid URB with transferbufferlength set to 0. On the first vary update, "len %= max" divides by zero and the kernel oopses.
Commit 564e69893c63 ("USB: usbtest: prevent a divide by zero bug") added the equivalent zero check to allocsglist(), which covers the scatterlist tests (test 7/8), but the single-URB variable-length path in simpleio() was left unprotected.
Fix this by returning -EINVAL early from simpleio() when vary is requested but max is zero, so the divide by zero never occurs. Zero-length transfers without vary remain valid for the other callers of simpleio().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 564e69893c63
Event History
Frequently Asked Questions
What conditions are required to trigger the kernel oops?
The usbtest driver's single-URB variable-length path must be used with a zero-length transfer. Specifically, variable-length tests 3 or 4 can reach the divide-by-zero condition when the requested length is zero.
Are all zero-length USB test transfers affected?
No. Zero-length transfers without variable-length operation remain valid for other callers of simple_io(). The issue occurs when varying the transfer length is requested and the URB transfer buffer length is zero.
What is the impact of successful triggering?
The kernel can encounter a divide-error oops in usbtest's simple_io() function, causing a kernel fault. The provided data describes a denial-of-service condition rather than any further impact.
Is there a configuration-level mitigation if the fix cannot be applied immediately?
Avoid running usbtest variable-length tests 3 or 4 with a requested transfer length of zero. This prevents the affected len modulo max calculation from using a zero divisor.