{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "b0e01253a764faab9ecf56c0759e6b06470eb9ff"
            },
            {
              "fixed": "56874f7cc8f1157a35ba5376125a4fc8874a1eb0"
            },
            {
              "fixed": "b286ee1cfb2d6a0cb4b9564d15508ce33d8a0506"
            },
            {
              "fixed": "c2213d9b61c1d6e99645a636630ee767c7542f78"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.18.66"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143240.json"
  },
  "details": "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-\u003ercv_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.",
  "id": "CVE-2026-143240",
  "modified": "2026-12-03T10:45:38.422916300Z",
  "published": "2026-12-03T09:20:53.064Z",
  "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/56874f7cc8f1157a35ba5376125a4fc8874a1eb0"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b286ee1cfb2d6a0cb4b9564d15508ce33d8a0506"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c2213d9b61c1d6e99645a636630ee767c7542f78"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143240.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-143240"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "tcp: rate limit receive queue collapsing"
}