CVE-2026-142949: tcp: fix NULL pointer dereference when restarting a Fast Open listener

Published Dec 3, 2026
·
Updated

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

tcp: fix NULL pointer dereference when restarting a Fast Open listener

When a valid RST is received for a Fast Open child accepted before the three-way handshake completes, reqskfastopenremove() adds the requestsock to the listener's RST list if the listener is in TCPLISTEN.

An application can call shutdown(SHUTRD) on a listener socket. inetcsklistenstop() checks rskqrsthead without holding fastopenq.lock. If rskqrsthead is NULL, it does not acquire the lock and therefore does not synchronize with an insertion by reqskfastopenremove() after that function has passed the TCPLISTEN check.

The more likely outcome of this race, even without a subsequent listen(), is a leak. If reqskfastopenremove() inserts a requestsock after inetcsklistenstop() observes an empty list and returns, the requestsock is stranded in rskqrsthead and keeps a reference on the listener. The socket is already in TCPCLOSE, so a subsequent close() does not call inetcsklistenstop() again.

If listen() is called again on the same socket before the delayed list insertion, the insertion can overlap the queue initialization in reqskqueuealloc(). If it occurs after rskqrsthead is set to NULL but before rskqrsttail is set to NULL, rskqrsthead points to the requestsock while rskqrsttail is NULL.

When a valid RST is later received for another accepted Fast Open child, rskqrsthead is not NULL, so reqskfastopenremove() attempts to write the requestsock pointer to rskqrsttail->dlnext while rskqrsttail is NULL. KASAN reports:

BUG: KASAN: null-ptr-deref in reqskfastopenremove+0x147/0x210 Write of size 8 at addr 0000000000000088 by task swapper/3/0 ... Call Trace: <IRQ> ... reqskfastopenremove+0x147/0x210 tcpcheckreq+0xa70/0x1060 ... tcprcvstateprocess+0x1cb/0x2ae0 ... tcpv4dorcv+0x1fe/0x740 tcpv4rcv+0x1744/0x2070 ... ipprotocoldeliverrcu+0x5c/0x280 iplocaldeliverfinish+0x171/0x330 iplocaldeliver+0x107/0x370 ... </IRQ>

To widen the race window, the issue was reproduced after adding mdelay(3000) immediately after reqskfastopenremove() checks that the listener is in TCPLISTEN and immediately after reqskqueuealloc() sets rskqrsthead to NULL.

Make inetcsklistenstop() acquire fastopenq.lock regardless of the value of rskqrsthead and detach the list while holding the lock. With this synchronization, reqskfastopenremove() either inserts the requestsock before inetcsklistenstop() acquires the lock, in which case inetcsklistenstop() reclaims it, or sees that the listener is not in TCPLISTEN and does not insert anything.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Modify inet_csk_listen_stop() to acquire fastopenq.lock regardless of whether rskq_rst_head is NULL.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:16 AM
Data Sourced
via MITRE·09:16 AM
Description

Frequently Asked Questions

1

Which systems are exposed to this race?

Exposure requires a Linux TCP Fast Open listener with a child connection accepted before the three-way handshake completes. The problematic path involves shutting down read access on the listener and, for the NULL dereference outcome, calling listen() again on the same socket while a delayed request insertion overlaps queue initialization.

2

What network condition is needed to trigger the affected path?

A valid TCP RST must be received for a Fast Open child before the three-way handshake completes. That RST can cause reqsk_fastopen_remove() to add the request to the listener's RST list while listener shutdown is occurring.

3

Is a crash the only possible outcome?

No. The description states that the more likely outcome, even without calling listen() again, is a leaked request_sock that remains stranded in the RST list and retains a reference to the listener. Re-listening on the same socket during the delayed insertion creates the NULL-pointer-dereference race.

4

Does the provided information identify affected kernel versions or an interim workaround?

No. The provided data identifies the Linux kernel and includes stable-tree fix references, but it does not list affected or fixed version ranges or a workaround.

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