{"id":"CVE-2026-143150","summary":"tcp: fix request_sock use-after-free during Fast Open accept()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: fix request_sock use-after-free during Fast Open accept()\n\nCommit e3d95ad7da4f (\"inet: avoid fastopen lock for regular accept()\")\nmade inet_csk_accept() check tfo_listener before taking fastopenq.lock\nto avoid taking the lock for connections that did not use Fast Open.\n\nreqsk_fastopen_remove() clears tfo_listener while holding fastopenq.lock,\nthen reads req-\u003esk. If inet_csk_accept() concurrently observes\ntfo_listener after it has been cleared, it skips fastopenq.lock and\ndrops the last reference to the request_sock. This can free the\nrequest_sock while reqsk_fastopen_remove() is still using it.\n\nIf the freed memory is reused for a new request_sock with req-\u003esk ==\nNULL, the reset path in reqsk_fastopen_remove() can append the new\nrequest_sock to the original listener's list of requests that caused an\nRST. After the new request_sock is freed, the next append writes through\nthe stale rskq_rst_tail into freed memory.\n\nKASAN reported the following use-after-free when writing\nfastopenq-\u003erskq_rst_tail-\u003edl_next = req:\n\n  BUG: KASAN: slab-use-after-free in reqsk_fastopen_remove+0x142/0x210\n  Write of size 8 at addr ffff888108230688 by task swapper/5/0\n  ...\n  Call Trace:\n   \u003cIRQ\u003e\n   ...\n   reqsk_fastopen_remove+0x142/0x210\n   tcp_check_req+0x96f/0xdd0\n   ...\n   tcp_rcv_state_process+0x19c/0x26b0\n   ...\n   tcp_v4_do_rcv+0x16e/0x490\n   tcp_v4_rcv+0x14a0/0x1af0\n   ...\n   ip_protocol_deliver_rcu+0x39/0x1e0\n   ip_local_deliver_finish+0x124/0x1e0\n   ip_local_deliver+0xfb/0x1e0\n   ...\n   \u003c/IRQ\u003e\n\nTo widen the race windows, mdelay(5) was added after newsk = req-\u003esk,\nmdelay(20) after the if (req) reqsk_put(req) block, and mdelay(100)\nafter tcp_rsk(req)-\u003etfo_listener = false. The KASAN report above was\nreproduced with this kernel.\n\nFor the lockless check, use tcp_sk(newsk)-\u003esyn_fastopen_child instead of\ntfo_listener, which reqsk_fastopen_remove() clears.\n\nsyn_fastopen_child is a field of the Fast Open child TCP socket\nreferenced by newsk, not of the request_sock. It is set before the child\nsocket is added to the accept queue. The paths that call\nreqsk_fastopen_remove() in response to a remote ACK or RST do not clear\nthis field.\n\ninet_csk_accept() uses this field to take fastopenq.lock only for Fast\nOpen child sockets and rechecks tfo_listener while holding the lock.\nConnections that did not use Fast Open continue to avoid the lock.","modified":"2026-12-03T11:01:27.603659992Z","published":"2026-12-03T09:19:53.273Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143150.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/62754aad50d0b30938bd8ce30b43474ce502a2af"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8a8043bb3b7093f92e776a8125be7bd4ad0214d4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b6410a98a09e1d910000dfb045920e94f782443d"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143150.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143150"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"e3d95ad7da4f8955599f0786d7c70497c0aaf8c9"},{"fixed":"b6410a98a09e1d910000dfb045920e94f782443d"},{"fixed":"8a8043bb3b7093f92e776a8125be7bd4ad0214d4"},{"fixed":"62754aad50d0b30938bd8ce30b43474ce502a2af"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143150.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.1.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143150.json"}}],"schema_version":"1.9.2"}