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

Summary

CVECVE-2026-142990
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-12-03 10:17:23 UTC
Updated2026-12-03 10:17:23 UTC
DescriptionIn 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().

Risk And Classification

EPSS: 0.002150000 probability, percentile 0.126240000 (date 2026-12-03)

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 2d0874ec58968a3116caf4b6187640ae06a74819 git Not specified
CNA Linux Linux affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 ae987e804d8c18679b117fd55dd55a5c88b195b5 git Not specified
CNA Linux Linux affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 14acfeda31204c8e22d75707e543a21ec2a0573b git Not specified
CNA Linux Linux affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 2468252d9190ebbf2da8d81b0132d7f2a67d86ec git Not specified
CNA Linux Linux affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 e86108348f12dcd64d2cdaa8f59ea5f696d6f4a3 git Not specified
CNA Linux Linux affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 fdaca138694111153f96c7d76877734b9dbf0e01 git Not specified
CNA Linux Linux affected 5.10.276 semver Not specified
CNA Linux Linux affected 5.15.227 semver Not specified
CNA Linux Linux affected 6.12.120 semver Not specified
CNA Linux Linux affected 6.18.66 semver Not specified
CNA Linux Linux affected 7.3.7 semver Not specified
CNA Linux Linux unaffected 5.10.276 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.227 5.15.* semver Not specified
CNA Linux Linux unaffected 6.12.120 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.66 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.7 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc4 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/2468252d9190ebbf2da8d81b0132d7f2a67d86ec 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/14acfeda31204c8e22d75707e543a21ec2a0573b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/fdaca138694111153f96c7d76877734b9dbf0e01 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/ae987e804d8c18679b117fd55dd55a5c88b195b5 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/e86108348f12dcd64d2cdaa8f59ea5f696d6f4a3 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/2d0874ec58968a3116caf4b6187640ae06a74819 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report