{"id":"CVE-2026-143150","state":"PUBLISHED","title":"tcp: fix request_sock use-after-free during Fast Open accept()","description":"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->sk. 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->sk ==\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->rskq_rst_tail->dl_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   <IRQ>\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   </IRQ>\n\nTo widen the race windows, mdelay(5) was added after newsk = req->sk,\nmdelay(20) after the if (req) reqsk_put(req) block, and mdelay(100)\nafter tcp_rsk(req)->tfo_listener = false. The KASAN report above was\nreproduced with this kernel.\n\nFor the lockless check, use tcp_sk(newsk)->syn_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.","publishedAt":"2026-12-03T09:19:53.273Z","updatedAt":"2026-12-03T09:19:53.273Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e3d95ad7da4f8955599f0786d7c70497c0aaf8c9","status":"affected","lessThan":"b6410a98a09e1d910000dfb045920e94f782443d","versionType":"git"},{"version":"e3d95ad7da4f8955599f0786d7c70497c0aaf8c9","status":"affected","lessThan":"8a8043bb3b7093f92e776a8125be7bd4ad0214d4","versionType":"git"},{"version":"e3d95ad7da4f8955599f0786d7c70497c0aaf8c9","status":"affected","lessThan":"62754aad50d0b30938bd8ce30b43474ce502a2af","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/inet_connection_sock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.1","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/inet_connection_sock.c"]}],"references":["https://git.kernel.org/stable/c/b6410a98a09e1d910000dfb045920e94f782443d","https://git.kernel.org/stable/c/8a8043bb3b7093f92e776a8125be7bd4ad0214d4","https://git.kernel.org/stable/c/62754aad50d0b30938bd8ce30b43474ce502a2af"],"weaknesses":[],"ingestedAt":"2026-12-03T09:40:06.136Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143150.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143150","state":"PUBLISHED","datePublished":"2026-12-03T09:19:53.273Z","dateUpdated":"2026-12-03T09:19:53.273Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.354Z"},"containers":{"cna":{"title":"tcp: fix request_sock use-after-free during Fast Open accept()","descriptions":[{"lang":"en","value":"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->sk. 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->sk ==\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->rskq_rst_tail->dl_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   <IRQ>\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   </IRQ>\n\nTo widen the race windows, mdelay(5) was added after newsk = req->sk,\nmdelay(20) after the if (req) reqsk_put(req) block, and mdelay(100)\nafter tcp_rsk(req)->tfo_listener = false. The KASAN report above was\nreproduced with this kernel.\n\nFor the lockless check, use tcp_sk(newsk)->syn_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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e3d95ad7da4f8955599f0786d7c70497c0aaf8c9","status":"affected","lessThan":"b6410a98a09e1d910000dfb045920e94f782443d","versionType":"git"},{"version":"e3d95ad7da4f8955599f0786d7c70497c0aaf8c9","status":"affected","lessThan":"8a8043bb3b7093f92e776a8125be7bd4ad0214d4","versionType":"git"},{"version":"e3d95ad7da4f8955599f0786d7c70497c0aaf8c9","status":"affected","lessThan":"62754aad50d0b30938bd8ce30b43474ce502a2af","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/inet_connection_sock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.1","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv4/inet_connection_sock.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b6410a98a09e1d910000dfb045920e94f782443d"},{"url":"https://git.kernel.org/stable/c/8a8043bb3b7093f92e776a8125be7bd4ad0214d4"},{"url":"https://git.kernel.org/stable/c/62754aad50d0b30938bd8ce30b43474ce502a2af"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:19:53.273Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.1","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.1","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.1","versionEndExcluding":"7.4-rc3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}