HIGH Introduced in 5.6
strparser Teardown UAF
CVE-2026-99056
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.1HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: strparser: make sure __strp_recv isn't running before tearing down the parser The comment above strp_done() claims that if strp is stopped, strp_recv will no longer be called. That's only true if the caller has a mechanism (eg locking) to guarantee that strp_recv() calls that started before strp_stop() have completed by the time we call strp_done(). This adds a dummy lock_sock/release_sock pair to guarantee that any in-flight strp_recv() (which runs under either bh_lock_sock or lock_sock, depending if it's called from ->sk_data_ready or strp_work) has completed. Only espintcp can be affected by this race condition, but this patch makes sure no future user of strp can have the bug. This could crash on strp->sk ("general mode" of strp), but this mode has been here for 9 years and has never been used. It'll be gone soon, no point worrying about it. Switch the stopped/paused/etc bits to u8's to avoid races between strp_stop() and strp_pause/unpause(). A reproducer has been published and turns the possible UAF into an exploit [1].
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_NET_ADMIN (obtainable in a user namespace) can trigger a use-after-free in the stream parser teardown path by racing IPsec ESP-in-TCP parser shutdown against concurrent packet processing. Successful exploitation yields arbitrary kernel read/write and privilege escalation. Products terminating ESP-in-TCP VPN connections are primarily at risk.
Vulnerability analysis
The stream parser (strparser) subsystem contains a race condition between parser teardown and in-flight packet processing. When strp_stop() marks the parser as stopped and strp_done() proceeds to free resources, there was no synchronization to wait for strp_recv() calls that had already started — these run under the socket lock (either bh_lock_sock from the data-ready callback or lock_sock from the work queue). The fix adds a lock_sock/release_sock pair in strp_done() to drain any concurrent strp_recv() execution before freeing the parser object, and converts the stopped/paused/aborted flags from single-bit bitfields to full u8 bytes to eliminate races between strp_stop() and strp_pause/unpause(). An attacker who can create and destroy IPsec ESP-in-TCP sockets (requiring CAP_NET_ADMIN, available in user namespaces) while flooding the connection with TCP packets can widen the race window and convert the use-after-free into a kernel privilege escalation.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.6 | 5.10.273 | b09071e2f846 |
| 5.15 | 5.6 | 5.15.224 | 933df60a465b |
| 6.1 | 5.6 | 6.1.191 | 61cc5dac60d5 |
| 6.12 | 5.6 | 6.12.113 | 9f3e9fe1b155 |
| 6.18 | 5.6 | 6.18.57 | d2b5f637b9b6 |
| 6.6 | 5.6 | 6.6.160 | a18dd388045d |
| 7.2 | 5.6 | 7.2.11 | eaa3a29004c0 |
| mainline | 5.6 | 7.3 | 0984ebc63179 |
| cip/6.12 | 5.6 | 6.12.114-cip34 | 9f3e9fe1b155 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.114-cip34 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |