GHSA-6545-RM8G-RQMV

Vulnerability from github – Published: 2026-12-03 12:31 – Updated: 2026-12-04 06:31
VLAI
Details

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

tcp: do not coalesce segments after FIN

A FIN consumes a sequence number. If another FIN segment is coalesced into an skb that already carries FIN, end_seq advances to account for the additional FIN, but tcp_flags still contains only one FIN bit.

When the preceding gap is filled and tcp_ofo_queue() processes the coalesced skb, rcv_nxt advances to the skb's end_seq. When the receive path consumes all data in the skb, copied_seq advances by the data length and one sequence number for FIN. If three or more FIN segments have been coalesced into one skb, tcp_inq() can still return a positive value after the receive queue becomes empty and the SOCK_DONE adjustment is applied.

TCP_ZEROCOPY_RECEIVE is another consumer affected by this state. tcp_zerocopy_receive() takes its length from tcp_inq() and follows skb->next without checking for the end of the receive queue.

Software kTLS receive is one consumer affected by this state. When strp->copy_mode is false, tls_strp_msg_consume() calls the TCP helper tcp_read_done() to consume the current TLS record. In the reproducer, tcp_read_done() consumed the record data and one FIN before freeing the receive skb.

When kTLS looked for the next record, tcp_inq() reported at least TLS_HEADER_SIZE bytes even though the receive queue was empty. tcp_recv_skb() returned NULL, so tls_strp_load_anchor_with_queue() hit WARN_ON_ONCE() and returned without updating the anchor.

Since tcp_inq() had reported at least TLS_HEADER_SIZE, tls_strp_read_sock() proceeded to tls_strp_check_queue_ok(). skb_shinfo(strp->anchor)->frag_list still pointed to the freed receive skb. tls_strp_check_queue_ok() then read TCP_SKB_CB(first)->seq through the stale pointer, causing a use-after-free.

The reproducer followed this call path:

tls_rx_rec_done() tls_strp_msg_consume() tcp_read_done() // frees the receive skb tls_strp_check_rcv() tls_strp_read_sock() tls_strp_load_anchor_with_queue() // returns after WARN_ON_ONCE() tcp_recv_skb() == NULL tls_strp_check_queue_ok() TCP_SKB_CB(first)->seq // reads the freed receive skb

KASAN reported:

BUG: KASAN: slab-use-after-free in tls_strp_check_queue_ok.isra.0+0x5f/0x100 Read of size 4 at addr ffff888103169ca8 by task ktls-server/71 ... Call Trace: ... tls_strp_check_queue_ok.isra.0+0x5f/0x100 tls_strp_check_rcv+0x2a9/0x400 ... tls_sw_recvmsg+0x3ce/0xa10 ... sock_recvmsg+0xea/0x100 __sys_recvfrom+0x142/0x1f0 ... __x64_sys_recvfrom+0x76/0x90 do_syscall_64+0xdd/0x4a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f ... ... Freed by task 71: ... napi_skb_cache_put+0x24/0xf0 skb_attempt_defer_free+0x183/0x3b0 tcp_read_done+0x2d4/0x340 tls_strp_msg_consume+0x45/0x80 tls_sw_recvmsg+0x3c4/0xa10 ...

In tcp_try_coalesce(), skip coalescing when the destination skb already carries FIN. tcp_add_backlog() calls skb_try_coalesce() directly instead of using this helper, so add the same check there. Since both paths check only the destination skb, a final segment carrying data and FIN can still be coalesced into an skb without FIN when the other coalescing checks pass.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-143152"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-12-03T10:17:49Z",
    "severity": "CRITICAL"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: do not coalesce segments after FIN\n\nA FIN consumes a sequence number. If another FIN segment is coalesced\ninto an skb that already carries FIN, end_seq advances to account for\nthe additional FIN, but tcp_flags still contains only one FIN bit.\n\nWhen the preceding gap is filled and tcp_ofo_queue() processes the\ncoalesced skb, rcv_nxt advances to the skb\u0027s end_seq. When the receive\npath consumes all data in the skb, copied_seq advances by the data\nlength and one sequence number for FIN. If three or more FIN segments\nhave been coalesced into one skb, tcp_inq() can still return a positive\nvalue after the receive queue becomes empty and the SOCK_DONE adjustment\nis applied.\n\nTCP_ZEROCOPY_RECEIVE is another consumer affected by this state.\ntcp_zerocopy_receive() takes its length from tcp_inq() and follows\nskb-\u003enext without checking for the end of the receive queue.\n\nSoftware kTLS receive is one consumer affected by this state. When\nstrp-\u003ecopy_mode is false, tls_strp_msg_consume() calls the TCP helper\ntcp_read_done() to consume the current TLS record. In the reproducer,\ntcp_read_done() consumed the record data and one FIN before freeing the\nreceive skb.\n\nWhen kTLS looked for the next record, tcp_inq() reported at least\nTLS_HEADER_SIZE bytes even though the receive queue was empty.\ntcp_recv_skb() returned NULL, so tls_strp_load_anchor_with_queue() hit\nWARN_ON_ONCE() and returned without updating the anchor.\n\nSince tcp_inq() had reported at least TLS_HEADER_SIZE,\ntls_strp_read_sock() proceeded to tls_strp_check_queue_ok().\nskb_shinfo(strp-\u003eanchor)-\u003efrag_list still pointed to the freed receive\nskb. tls_strp_check_queue_ok() then read TCP_SKB_CB(first)-\u003eseq through\nthe stale pointer, causing a use-after-free.\n\nThe reproducer followed this call path:\n\n  tls_rx_rec_done()\n    tls_strp_msg_consume()\n      tcp_read_done()                       // frees the receive skb\n    tls_strp_check_rcv()\n      tls_strp_read_sock()\n        tls_strp_load_anchor_with_queue()   // returns after WARN_ON_ONCE()\n          tcp_recv_skb() == NULL\n        tls_strp_check_queue_ok()\n          TCP_SKB_CB(first)-\u003eseq            // reads the freed receive skb\n\nKASAN reported:\n\n  BUG: KASAN: slab-use-after-free in tls_strp_check_queue_ok.isra.0+0x5f/0x100\n  Read of size 4 at addr ffff888103169ca8 by task ktls-server/71\n  ...\n  Call Trace:\n   \u003cTASK\u003e\n   ...\n   tls_strp_check_queue_ok.isra.0+0x5f/0x100\n   tls_strp_check_rcv+0x2a9/0x400\n   ...\n   tls_sw_recvmsg+0x3ce/0xa10\n   ...\n   sock_recvmsg+0xea/0x100\n   __sys_recvfrom+0x142/0x1f0\n   ...\n   __x64_sys_recvfrom+0x76/0x90\n   do_syscall_64+0xdd/0x4a0\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n   ...\n   \u003c/TASK\u003e\n  ...\n  Freed by task 71:\n   ...\n   napi_skb_cache_put+0x24/0xf0\n   skb_attempt_defer_free+0x183/0x3b0\n   tcp_read_done+0x2d4/0x340\n   tls_strp_msg_consume+0x45/0x80\n   tls_sw_recvmsg+0x3c4/0xa10\n   ...\n\nIn tcp_try_coalesce(), skip coalescing when the destination skb already\ncarries FIN. tcp_add_backlog() calls skb_try_coalesce() directly instead\nof using this helper, so add the same check there. Since both paths check\nonly the destination skb, a final segment carrying data and FIN can still\nbe coalesced into an skb without FIN when the other coalescing checks pass.",
  "id": "GHSA-6545-rm8g-rqmv",
  "modified": "2026-12-04T06:31:08Z",
  "published": "2026-12-03T12:31:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-143152"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0fad9b99568afaf017a545302abca2b4b36b319b"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1c46780dec48893b8c25fd5e33a3127e8dc39dd4"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c9484616ef9b00343bb880b1f11100822b877b3e"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.