cvelo
P4 · InfoEPSS 0.2%

usb: usbtest: prevent divide by zero in simple_io() with zero length

  • CVE-2026-142990
  • GHSA-5p93-622j-xf9g
  • EUVD-2026-142606

Description

In the Linux kernel, the following vulnerability has been resolved: usb: usbtest: prevent divide by zero in simple_io() with zero length A divide error oops was observed in simple_io(): usbtest 1-1:1.0: TEST 3: write/1 0..0 bytes 16307 times Oops: divide error: 0000 [#1] SMP KASAN RIP: 0010:simple_io+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->transfer_buffer_length. However, when a zero-length transfer is requested (param->length == 0), simple_alloc_urb() still returns a valid URB with transfer_buffer_length 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 alloc_sglist(), which covers the scatterlist tests (test 7/8), but the single-URB variable-length path in simple_io() was left unprotected. Fix this by returning -EINVAL early from simple_io() 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 simple_io().

Text from the CVE.org record.

Recommendation

  • Linux

    • If you run a version before 7.3.7update to 7.3.7 or later
    • If you run a version before 6.18.66update to 6.18.66 or later
    • If you run a version before 6.12.120update to 6.12.120 or later
    • If you run a version before 5.15.227update to 5.15.227 or later
    • If you run a version before 5.10.276update to 5.10.276 or later

Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • Linux

    Affected versionsFixed in
    before 7.3.77.3.7
    before 6.18.666.18.66
    before 6.12.1206.12.120
    before 5.15.2275.15.227
    before 5.10.2765.10.276
    from 5.10.276 up to 5.10.*: not affectednone stated
    from 5.15.227 up to 5.15.*: not affectednone stated
    from 6.12.120 up to 6.12.*: not affectednone stated

    and 3 more

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.