CVE-2026-142882
Received Received - Intake

Use-After-Free in Linux Kernel 9pfs USB Gadget Driver

Vulnerability report for CVE-2026-142882, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-12-03

Last updated on: 2026-12-03

Assigner: kernel.org

Description

In the Linux kernel, the following vulnerability has been resolved: net/9p/usbg: clear stale request context after abort usb9pfs_clear_tx() serializes access to the active TX request with usb9pfs->lock, but leaves in_req->context pointing at the request after p9_client_cb() drops the transport reference. A later teardown path can therefore retrieve the same request after it has been freed: CPU 0 (p9_usbg_close) CPU 1 (usb9pfs_disable) lock(usb9pfs->lock) req = in_req->context p9_client_cb(client, req) p9_req_put(client, req) unlock(usb9pfs->lock) request reaches zero refs kmem_cache_free(req) lock(usb9pfs->lock) req = in_req->context read req->t_err 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 usb9pfs_clear_tx+0x166/0x1b0 Read of size 4 at addr ffff88810e7420f4 by task poc/94 Call Trace: usb9pfs_clear_tx+0x166/0x1b0 usb9pfs_disable+0x1d/0x30 reset_config+0x9d/0x200 __composite_disconnect+0xa7/0x140 Allocated by task 93: kmem_cache_alloc_noprof+0x141/0x370 p9_tag_alloc+0x8f/0x5b0 p9_client_prepare_req+0xff/0x350 p9_client_rpc+0x1a5/0xac0 Freed by task 0: slab_free_after_rcu_debug+0xa6/0x1e0 rcu_core+0x50a/0x1850 Last potentially related work creation: kmem_cache_free+0x1db/0x3d0 p9_req_put+0x164/0x1f0 usb9pfs_clear_tx+0x120/0x1b0 p9_usbg_close+0x7e/0x150 Clear in_req->context after the callback while still holding the lock. This matches the consume-and-clear pattern in usb9pfs_tx_complete(), so subsequent teardown calls return without touching the released request. The existing callback and error ordering remain unchanged.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-12-03
Last Modified
2026-12-03
Generated
2026-12-03
AI Q&A
2026-12-03
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a use-after-free vulnerability in the Linux kernel's 9P filesystem over USB (9p/usbg). It occurs when a request context pointer remains accessible after the associated memory has been freed. The issue arises because usb9pfs_clear_tx() clears the in_req->context pointer after calling p9_client_cb(), which may drop the last reference to the request, allowing it to be freed. Later, another thread can access the stale pointer, leading to a use-after-free condition.

Detection Guidance

This vulnerability is specific to the Linux kernel's 9P filesystem over USB gadget (usb9pfs). Detection requires checking kernel logs for slab-use-after-free errors related to usb9pfs_clear_tx or usb9pfs_disable. Use commands like dmesg | grep -i 'KASAN\|usb9pfs' or journalctl -k | grep -i 'usb9pfs\|slab-use-after-free' to identify such issues.

Impact Analysis

This vulnerability could allow an attacker to cause a denial-of-service (system crash) or potentially execute arbitrary code with kernel privileges. It affects systems using the 9P filesystem over USB, which is commonly used for virtualization and containerization scenarios. Successful exploitation requires local access to the vulnerable system.

Mitigation Strategies

Update your Linux kernel to a patched version that resolves CVE-2026-142882. If immediate patching is not possible, disable the 9P filesystem over USB gadget by unloading the usb9pfs module or disabling the CONFIG_9P_FS_USBG option in your kernel configuration.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-142882. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...