HIGH Introduced in 6.18
psp RxAssociation UAF
CVE-2026-99116
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI8.0HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: net: psp: do not inherit the Rx association on clone sk->psp_assoc sits past sk_dontcopy_end, so sock_copy() copies it into every socket accepted from a listener without taking a reference, while inet_sock_destruct() puts for every inet socket. psp_twsk_init() does refcount_inc() for the timewait socket, so a child closing through TIME_WAIT cancels its own put and leaves the association with one reference and N timewait sockets holding the same pointer. Closing the listener frees it, and the timewait timers then put freed memory. Rejecting the association on a listening socket is not sufficient: a socket can acquire one while established and then be turned back into a listener, because tcp_disconnect() leaves sk->psp_assoc in place. BUG: KASAN: slab-use-after-free in psp_twsk_assoc_free+0x6f/0xf0 Write of size 4 at addr ffff888110f9255c by task swapper/7/0 psp_twsk_assoc_free+0x6f/0xf0 inet_twsk_put+0xda/0x1b0 call_timer_fn+0x53/0x2e0 __run_timers+0x764/0xa80 Freed by task 99: kfree+0x1a7/0x500 process_one_work+0x7ec/0x1100 An association carries a per-connection SPI and key, so a child must not inherit the parent's. Clear it on clone.
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 PSP subsystem by creating a TCP listener with a security association, accepting connections, and closing the listener. This leads to kernel memory corruption, enabling privilege escalation to root or container escape. Products running TCP services with PSP enabled and allowing unprivileged user namespaces are at highest risk.
Vulnerability analysis
The PSP subsystem stores a receive security association pointer (psp_assoc) in the socket structure past the sk_dontcopy_end boundary, causing sock_copy() to copy the raw pointer into every child socket accepted from a listener without incrementing the reference count. Each child socket's destructor decrements the reference, while timewait sockets increment it during initialization. When the listener closes, it frees the association, but multiple timewait sockets still hold stale pointers; their timers later access the freed memory, causing a use-after-free. The fix clears psp_assoc during socket cloning so children do not inherit the parent's association. An attacker needs local access and the ability to install a PSP association (via netlink, requiring CAP_NET_ADMIN), which is obtainable inside a user namespace, making this exploitable by unprivileged users in typical container environments.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 6.18 | 6.18.59 | a9f14ea73e82 |
| 7.2 | 6.18 | 7.2.13 | c962695467d3 |
| mainline | 6.18 | 7.3 | 1d2929d0850f |