CVE-2026-98432: Linux IPv4 TCP Use-After-Free
Working notes on the IPv4 TCP use-after-free, the race condition, object lifetime, and the kernel fix.
what is it ?#
- CVE-2026-98432 is a tcp handshake, use-after-free vulnerability.
Background#
- linux kernel handles the half-open tcp connections which are the connections that didnt established yet, meaning it didnt completed the three-way-handshake yet :
Client Server
(CLOSED) (LISTEN)
| |
| 1. SYN (seq=x) |
|-------------------------------------->|
| SYN-SENT | SYN-RECEIVED
| |
| 2. SYN-ACK (seq=y, ack=x+1) |
|<--------------------------------------|
| |
| 3. ACK (seq=x+1, ack=y+1) |
|-------------------------------------->|
| ESTABLISHED | ESTABLISHED
| |
|<========== data transfer ============>|- tcp is just a protocol it can be customized i mean the implementation can be modified or extended … the main is that the server will receive what the protocol needs.
The vulnerability#
- STAGE 1: getting a usefull info (stage 1 is in the CVE scoring notes: kernel heap contents can be disclosed to the remote peer) now imaging a single half connection which is not established yet. the
SYNmust carry IP options, otherwise nothing is saved and nothing gets freed. the same connection sends firstSYNthen a retransmittedSYN(resend it) and then theSYN. CPU2 processes the retransmittedSYN, CPU1 processes theACK, now the server needs to respond to the retransmittedSYNwhile the connection is being created.
// simplified, the real structs have more fields
struct request_sock {
struct sock_common __req_common;
struct request_sock *dl_next;
struct timer_list rsk_timer;
struct sock *sk;
// ...
};
struct inet_request_sock {
struct request_sock req; // embeds the request_sock
struct ip_options_rcu __rcu *ireq_opt; // <-- HERE IN THIS OBJECT
// ...
};
struct tcp_request_sock {
struct inet_request_sock req; // embeds the above
u32 rcv_isn;
u32 snt_isn;
// ... TCP-specific fields ...
};
// ============================================
// OBJECT 2: the IP options (separately allocated)
// THIS is the object that gets freed while still in use — the vulnerable one.
// ============================================
struct ip_options_rcu {
struct rcu_head rcu; // designed for safe deferred free (kfree_rcu)
struct ip_options opt;
};
struct ip_options {
unsigned char optlen; // length of the options
unsigned char __data[0]; // raw option bytes
};- those are the structs of a half-established connection. before an 2015 commit, the listener lock processes request sockets, only when unlocking it cpu2 can use it. the commit made it lock-free meaning any process can use it at the same time as others.
- so the first
SYNinitialize it and fill it … the retransmittedSYNpoint to it, now both cpus are using the same data. - ram spaces in kernel are grouped by usage, falged in use or free. in use when allocating it, free when destroyed, it does not check if some process is using it.
- now the
ACKfinishes the handshake so the kernel creates a child socket, andireq_optis moved to it (inet_opt), not copied. when the child socket is destroyedinet_sock_destruct()freesinet_optwithkfree(), while the retransmittedSYNstill needs it because it returnsip_optionsin theSYN-ACK. but those are flagged free. the kernel will use it for something else while the cpu2 still pointing to it and will returns it. now there is a gap between the free and the secondSYN-ACKbeing built. during this gap theip_optionsspace in ram is flagged free. a process may override it and write to that space then secondSYN-ACKwill send or return whatever was written there. it may be some random data or it may be the kernel adress in ram. a kernel adress can be recognized based on it s offset in ram and some other indicators… - but the kernel’s safety ensure a piece of data’s permissions is either write or execute. so if we wrote code in that place the options it wont be executed at all. so instead the kernel’s adress is known. linux kernel’s code source is available and the distances meaning the offset between kernel functions are fixed meaning a function’s adress that launches
sshprocess is known if the kernel adress is. because the offset between the two is deterministic. stage 1 is done when we get a usefull info such as a kernel adress. - STAGE 2: take over (anthropic only says a callback pointer was overwritten so the kernel ran a command as root, the details were not published) we can override
ip_options_rcuand when know what does it looks like i mean the implementation, it s an object and has a function that destroy it. and it know it by a pointer to it, along with arguments. overriding the adress of that destructor is possible and makes the kernel calls another function by overriding the pointer of the destructor. we can’t point to a function that we wrote in the IP options because it has write permissions the kernel will not execute it. but we can override it with a kernel’s function adress and passing some sort of arguments: an example is calling a process privilage escalation that makes a process root and passing the process we are controlling it the tcp connection and it wont be forbidden because the function belong to kernel and kernel operate in ring 0 a full permissions over all and over hardware. but this is nowhere close to easy. - STAGE 3 (unverified, not in the CVE text) it’s not publicly available anthropics confirmed that it did got a root shell. so this stage along with second stage can be done by all kind of ways.
- the thing here is that its a zero-click attack (the CVSS vector says no user interaction is needed, only the full remote root exploit is unverified) meaning it needs no action from the victime. and it s legitimate.
Sources#
References
- 1CVE-2026-98432: A Remote Use-After-Free in the Linux Kernel's TCP StackAkamai Security Intelligence Group · 2026
- 2CVE-2026-98432: Inside the Critical Linux TCP Use-After-Free That Fires Before Your App Sees a ByteUpwind · 2026
- 3CVE-2026-98432CVE Program and Linux kernel CVE team · 2026