# CVE-2026-31607: usbip: validate number\_of\_packets in usbip\_pack\_ret\_submit()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.46% (percentile 32, 2026-11-26)
- **CWE:** CWE-787, CWE-805
- **Published:** 2026-04-24T14:42:29.468Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 324262c38438255bf6bdbf6342ca47c0badaab76; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 973f2c250289f5bf6cc146b98aa6fdde11fe50d6; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< ce744264b06b97069b3722511ab355738311fee0; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 885c8591784da6314f9aa82fa460ac69f9f79e5f; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 8d155e2d1c4102f74f82a2bf9c016164bb0f7384; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 906f16a836de13fe61f49cdce2f66f2dbd14caf4; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< ef8ebb1c637b4cfb61a9dd2e013376774ee2033b; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 5e1c4ece08ccdc197177631f111845a2c68eede3; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 2ab833a16a825373aad2ba7d54b572b277e95b71; d9638d9236eed035a575feddec61d036dacc2676; …
- Anyone running Linux 2.6.39

## Description

In the Linux kernel, the following vulnerability has been resolved:

usbip: validate number\_of\_packets in usbip\_pack\_ret\_submit()

When a USB/IP client receives a RET\_SUBMIT response,
usbip\_pack\_ret\_submit() unconditionally overwrites
urb-\>number\_of\_packets from the network PDU. This value is
subsequently used as the loop bound in usbip\_recv\_iso() and
usbip\_pad\_iso() to iterate over urb-\>iso\_frame\_desc\[\], a flexible
array whose size was fixed at URB allocation time based on the
\*original\* number\_of\_packets from the CMD\_SUBMIT.

A malicious USB/IP server can set number\_of\_packets in the response
to a value larger than what was originally submitted, causing a heap
out-of-bounds write when usbip\_recv\_iso() writes to
urb-\>iso\_frame\_desc\[i\] beyond the allocated region.

KASAN confirmed this with kernel 7.0.0-rc5:

  BUG: KASAN: slab-out-of-bounds in usbip\_recv\_iso+0x46a/0x640
  Write of size 4 at addr ffff888106351d40 by task vhci\_rx/69

  The buggy address is located 0 bytes to the right of
   allocated 320-byte region \[ffff888106351c00, ffff888106351d40)

The server side (stub\_rx.c) and gadget side (vudc\_rx.c) already
validate number\_of\_packets in the CMD\_SUBMIT path since commits
c6688ef9f297 ("usbip: fix stub\_rx: harden CMD\_SUBMIT path to handle
malicious input") and b78d830f0049 ("usbip: fix vudc\_rx: harden
CMD\_SUBMIT path to handle malicious input"). The server side validates
against USBIP\_MAX\_ISO\_PACKETS because no URB exists yet at that point.
On the client side we have the original URB, so we can use the tighter
bound: the response must not exceed the original number\_of\_packets.

This mirrors the existing validation of actual\_length against
transfer\_buffer\_length in usbip\_recv\_xbuff(), which checks the
response value against the original allocation size.

Kelvin Mbogo's series ("usb: usbip: fix integer overflow in
usbip\_recv\_iso()", v2) hardens the receive-side functions themselves;
this patch complements that work by catching the bad value at its
source -- in usbip\_pack\_ret\_submit() before the overwrite -- and
using the tighter per-URB allocation bound rather than the global
USBIP\_MAX\_ISO\_PACKETS limit.

Fix this by checking rpdu-\>number\_of\_packets against
urb-\>number\_of\_packets in usbip\_pack\_ret\_submit() before the
overwrite. On violation, clamp to zero so that usbip\_recv\_iso() and
usbip\_pad\_iso() safely return early.

## Affected and fixed versions

- Linux: \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 324262c38438255bf6bdbf6342ca47c0badaab76; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 973f2c250289f5bf6cc146b98aa6fdde11fe50d6; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< ce744264b06b97069b3722511ab355738311fee0; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 885c8591784da6314f9aa82fa460ac69f9f79e5f; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 8d155e2d1c4102f74f82a2bf9c016164bb0f7384; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 906f16a836de13fe61f49cdce2f66f2dbd14caf4; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< ef8ebb1c637b4cfb61a9dd2e013376774ee2033b; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 5e1c4ece08ccdc197177631f111845a2c68eede3; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 2ab833a16a825373aad2ba7d54b572b277e95b71; d9638d9236eed035a575feddec61d036dacc2676; … (cvelist)
- Linux: 2.6.39 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31607. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31607.md
Affected: Linux >= 1325f85fa49f57df034869de430f7c302ae23109, < 324262c38438255bf6bdbf6342ca47c0badaab76; >= 1325f85fa49f57df034869de430f7c302ae23109, < 973f2c250289f5bf6cc146b98aa6fdde11fe50d6; >= 1325f85fa49f57df034869de430f7c302ae23109, < ce744264b06b97069b3722511ab355738311fee0; >= 1325f85fa49f57df034869d…
Fixed in: Linux 324262c38438255bf6bdbf6342ca47c0badaab76, Linux 973f2c250289f5bf6cc146b98aa6fdde11fe50d6, Linux 885c8591784da6314f9aa82fa460ac69f9f79e5f, Linux 8d155e2d1c4102f74f82a2bf9c016164bb0f7384, Linux 906f16a836de13fe61f49cdce2f66f2dbd14caf4, Linux 5e1c4ece08ccdc197177631f111845a2c68eede3, Linux 2ab83…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31607 being exploited?

There is no confirmed exploitation: CVE-2026-31607 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.46% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-31607?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-31607?

Linux \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 324262c38438255bf6bdbf6342ca47c0badaab76; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 973f2c250289f5bf6cc146b98aa6fdde11fe50d6; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< ce744264b06b97069b3722511ab355738311fee0; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 885c8591784da6314f9aa82fa460ac69f9f79e5f; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 8d155e2d1c4102f74f82a2bf9c016164bb0f7384; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 906f16a836de13fe61f49cdce2f66f2dbd14caf4; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< ef8ebb1c637b4cfb61a9dd2e013376774ee2033b; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 5e1c4ece08ccdc197177631f111845a2c68eede3; \>= 1325f85fa49f57df034869de430f7c302ae23109, \< 2ab833a16a825373aad2ba7d54b572b277e95b71; d9638d9236eed035a575feddec61d036dacc2676; …; Linux 2.6.39.

### Is there a fix for CVE-2026-31607?

Yes. Fixed in Linux 324262c38438255bf6bdbf6342ca47c0badaab76, Linux 973f2c250289f5bf6cc146b98aa6fdde11fe50d6, Linux 885c8591784da6314f9aa82fa460ac69f9f79e5f, Linux 8d155e2d1c4102f74f82a2bf9c016164bb0f7384, Linux 906f16a836de13fe61f49cdce2f66f2dbd14caf4, Linux 5e1c4ece08ccdc197177631f111845a2c68eede3, Linux 2ab833a16a825373aad2ba7d54b572b277e95b71. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-31607?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/errata/RHSA-2026:25095>
- vendor: <https://access.redhat.com/errata/RHSA-2026:41236>
- vendor: <https://access.redhat.com/errata/RHSA-2026:24343>
- vendor: <https://access.redhat.com/errata/RHSA-2026:19569>
- vendor: <https://access.redhat.com/errata/RHSA-2026:23224>
- vendor: <https://access.redhat.com/errata/RHSA-2026:19568>
- patch: <https://git.kernel.org/stable/c/885c8591784da6314f9aa82fa460ac69f9f79e5f>
- patch: <https://git.kernel.org/stable/c/8d155e2d1c4102f74f82a2bf9c016164bb0f7384>
- patch: <https://git.kernel.org/stable/c/906f16a836de13fe61f49cdce2f66f2dbd14caf4>
- patch: <https://git.kernel.org/stable/c/ef8ebb1c637b4cfb61a9dd2e013376774ee2033b>
- patch: <https://git.kernel.org/stable/c/5e1c4ece08ccdc197177631f111845a2c68eede3>
- patch: <https://git.kernel.org/stable/c/2ab833a16a825373aad2ba7d54b572b277e95b71>
- other: <https://git.kernel.org/stable/c/324262c38438255bf6bdbf6342ca47c0badaab76>
- other: <https://git.kernel.org/stable/c/973f2c250289f5bf6cc146b98aa6fdde11fe50d6>
- other: <https://git.kernel.org/stable/c/ce744264b06b97069b3722511ab355738311fee0>
- other: <https://access.redhat.com/security/cve/CVE-2026-31607>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2461521>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31607.json>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31607>

HTML: <https://flawdb.com/CVE-2026-31607> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31607>
