CVE-2026-142882: net/9p/usbg: clear stale request context after abort

Published Dec 3, 2026
·
Updated

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

net/9p/usbg: clear stale request context after abort

usb9pfscleartx() serializes access to the active TX request with usb9pfs->lock, but leaves inreq->context pointing at the request after p9clientcb() drops the transport reference. A later teardown path can therefore retrieve the same request after it has been freed:

CPU 0 (p9usbgclose) CPU 1 (usb9pfsdisable) lock(usb9pfs->lock) req = inreq->context p9clientcb(client, req) p9reqput(client, req) unlock(usb9pfs->lock) request reaches zero refs kmemcachefree(req) lock(usb9pfs->lock) req = inreq->context read req->terr

The lock orders the two callbacks, but cannot protect a pointer that remains published after its reference has been released. KASAN reported:

BUG: KASAN: slab-use-after-free in usb9pfscleartx+0x166/0x1b0 Read of size 4 at addr ffff88810e7420f4 by task poc/94 Call Trace: usb9pfscleartx+0x166/0x1b0 usb9pfsdisable+0x1d/0x30 resetconfig+0x9d/0x200 compositedisconnect+0xa7/0x140 Allocated by task 93: kmemcacheallocnoprof+0x141/0x370 p9tagalloc+0x8f/0x5b0 p9clientpreparereq+0xff/0x350 p9clientrpc+0x1a5/0xac0 Freed by task 0: slabfreeafterrcudebug+0xa6/0x1e0 rcucore+0x50a/0x1850 Last potentially related work creation: kmemcachefree+0x1db/0x3d0 p9reqput+0x164/0x1f0 usb9pfscleartx+0x120/0x1b0 p9usbgclose+0x7e/0x150

Clear inreq->context after the callback while still holding the lock. This matches the consume-and-clear pattern in usb9pfstxcomplete(), so subsequent teardown calls return without touching the released request. The existing callback and error ordering remain unchanged.

Affected Software

4 affected componentsFixes available
Linux Linux kernel
linux/kernel>=6.12.0<6.12.118
6.12.118
linux/kernel>=6.13.0<6.18.64
6.18.64
linux/kernel>=6.19.0<7.3.5
7.3.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.118
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.64
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.5
  4. Compensating control

    In usb9pfs_clear_tx(), clear in_req->context after the callback while still holding usb9pfs->lock, so teardown cannot retrieve a released request.

Event History

Dec 3, 2026
CVE Published
via MITRE·03:23 AM
Data Sourced
via MITRE·03:23 AM
Description
Data Sourced
via OSV·03:23 AM
DescriptionAffected Software
Data Sourced
via NVD·04:18 AM
Description

Frequently Asked Questions

1

What conditions are needed to trigger the use-after-free?

The race involves an active USB 9P transmit request being aborted or closed while a USB gadget disable or teardown path runs. The close path can release the request while its pointer remains in in_req->context, and the later disable path can dereference that stale pointer.

2

Who is most likely exposed to this issue?

Systems using the Linux kernel's net/9p/usbg USB 9P filesystem gadget code are the relevant population. The provided data does not establish whether this configuration is enabled or used by default.

3

How can an affected system be identified during testing or diagnosis?

KASAN may report a slab use-after-free in usb9pfs_clear_tx, with usb9pfs_disable and USB gadget disconnect or reset paths in the call trace. The report may show a read of req->t_err after the associated 9P request has been freed.

4

Which kernel versions contain the fix?

The provided information does not list affected or fixed kernel version numbers. It provides three stable kernel commit references for the resolved issue.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203