{"id":"CVE-2026-143240","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-12-03T10:18:03.253","lastModified":"2026-12-04T04:17:45.183","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: rate limit receive queue collapsing\n\nWhen a socket is over its receive buffer limit and its sk_rcvbuf can\nnot grow, every incoming segment that needs memory goes through\ntcp_prune_queue(), which runs tcp_collapse_ofo_queue() and tcp_collapse()\non the receive queue. Both walk their whole queue, even when there is\nnothing left to collapse.\n\nA peer can trigger this walk per packet, without refilling memory:\n\n1) The segment lands last in the out-of-order queue. Since commit\n   b0e01253a764 (\"tcp: refine tcp_prune_ofo_queue() logic\"),\n   tcp_prune_ofo_queue() drops nothing, the segment is dropped and\n   the queues are unchanged. The peer can send it again forever.\n\n2) The segment lands second to last: one skb is pruned, and one small\n   segment fills that space again.\n\n3) The out-of-order queue is empty and the receive queue alone is over\n   the limit (application not reading). Collapsing frees nothing,\n   the out-of-order segment is dropped, and the window is not closed.\n\n4) Collapsing frees just one skb, enough to queue the segment. The next\n   segment is over the limit again.\n\nOnly allow a collapse if at least 1/8 of sk_rcvbuf of new memory was\nqueued in the receive queues since the previous collapse. This restores\nthe \"12.5 % of the queue capacity\" amortization of the 2018 SegmentSmack\nfixes (CVE-2018-5390), using the same unit as the sk_rcvbuf limit, so\nthat peers sending small (bloated) segments are not penalized.\n\nThe credit is the net growth of sk_rmem_alloc in tcp_queue_rcv() and\ntcp_data_queue_ofo(), so that:\n\n- Coalescing a segment into the tailroom of the previous skb charges no\n  memory, and earns no credit.\n- An out-of-order segment replacing or covering queued skbs only earns\n  the memory it adds.\n- Duplicates earn nothing.\n- Data moved from the out-of-order queue to the receive queue\n  (tcp_ofo_queue()) is not credited twice.\n\nIn-order data is credited too, so that a receive queue filled by\nbloated in-order segments can still be collapsed when a hole appears.\n\nIn-order segments are rate limited as well: a peer could otherwise send\nsmall in-order segments that each trigger a collapse freeing a single\nskb, enough to queue the segment, while the out-of-order queue holds\nmany skbs that can not be collapsed.\n\nThe credit is tracked in a new u32 tp->rcv_collapse_credit, placed in a\nhole of the tcp_sock_write_rx group: no other field moves, and tcp_sock\nsize is unchanged. tcp_queue_rcv() now samples sk_rmem_alloc, and\nwrites the credit until it saturates at sk_rcvbuf, so that the fast path\nstops writing it after a full buffer of new memory. Saturating at the\ngoal would not work: sk_rcvbuf, and the goal with it, can grow later\n(for instance in tcp_clamp_window(), just before the goal is checked),\nand a socket over its limit can not earn more credit until the\napplication reads.\n\nWhen collapsing is not allowed, tcp_prune_queue() goes directly to\ntcp_prune_ofo_queue(), which is cheap in the cases above.\n\nA regular flow can see a difference when it goes over its limit before\n1/8 of sk_rcvbuf of new memory was queued since the previous collapse:\nout-of-order skbs can be pruned (even for an in-order segment filling a\nhole), and an in-order segment that still does not fit is dropped,\nwith a zero window advertised, where a collapse might have made room."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["Documentation/networking/net_cachelines/tcp_sock.rst","include/linux/tcp.h","net/ipv4/tcp.c","net/ipv4/tcp_input.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"b0e01253a764faab9ecf56c0759e6b06470eb9ff","lessThan":"56874f7cc8f1157a35ba5376125a4fc8874a1eb0","versionType":"git","status":"affected"},{"version":"b0e01253a764faab9ecf56c0759e6b06470eb9ff","lessThan":"b286ee1cfb2d6a0cb4b9564d15508ce33d8a0506","versionType":"git","status":"affected"},{"version":"b0e01253a764faab9ecf56c0759e6b06470eb9ff","lessThan":"c2213d9b61c1d6e99645a636630ee767c7542f78","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["Documentation/networking/net_cachelines/tcp_sock.rst","include/linux/tcp.h","net/ipv4/tcp.c","net/ipv4/tcp_input.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.2","status":"affected"},{"version":"0","lessThan":"6.2","versionType":"semver","status":"unaffected"},{"version":"6.18.66","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.7","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc3","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}]},"references":[{"url":"https://git.kernel.org/stable/c/56874f7cc8f1157a35ba5376125a4fc8874a1eb0","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/b286ee1cfb2d6a0cb4b9564d15508ce33d8a0506","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/c2213d9b61c1d6e99645a636630ee767c7542f78","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}