CRITICAL Introduced in 4.18
tcp CollapseFence Bypass
CVE-2026-98549
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
KernelScan AI7.2HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: tcp: prevent collapsing skbs across boundary in rtx queue tcp_write_collapse_fence() sets TCP_SKB_CB(skb)->eor = 1 on tcp_write_queue_tail(sk) to prevent skbs queued after a switch to device encryption from being collapsed into earlier skbs. The fence is a no-op if all earlier data has already been transmitted when the switch happens: sk->sk_write_queue is empty. The not yet acknowledged earlier skbs wait in sk->tcp_rtx_queue with eor 0. On a subsequent retransmit or SACK shift, tcp_retrans_try_collapse() or tcp_shift_skb_data() can then merge an skb queued after the switch into one queued before it. Both users of the fence are affected: - psp: devices only encrypt skbs with skb->decrypted set. The merged skb keeps decrypted = 0 from the earlier skb, so merged data sent after psp_sock_assoc_set_tx() is retransmitted in cleartext. - tls device offload: the merged skb straddles the start marker set in tls_set_device_offload(). The software fallback (fill_sg_in() returns -EINVAL) and the mlx5, nfp and funeth drivers cannot handle such an skb and drop it. Every retransmit rebuilds the same skb, so the connection stalls. Fix this in two places, for defense in depth: 1. Fall back to tcp_rtx_queue_tail(sk) in tcp_write_collapse_fence() when tcp_write_queue_tail(sk) is NULL. 2. Check !skb_cmp_decrypted(to, from) in tcp_skb_can_collapse(), as tcp_skb_can_collapse_rx() does on receive. skb_shift(), which both collapse paths call, already has a DEBUG_NET_WARN_ON_ONCE() for this condition.
02KernelScan AI Analysis
Risk summary
A local user who can establish a TCP connection with TLS device offload or PSP enabled can cause encrypted data to be retransmitted in cleartext (PSP) or stall the connection permanently (TLS offload). The bug is triggered when packet loss forces a retransmit or SACK shift after an encryption-mode switch, merging SKBs across the security boundary.
Vulnerability analysis
When a TCP connection switches to hardware encryption (TLS offload or PSP), the kernel marks the last outgoing packet to prevent later packets from being merged with earlier unencrypted ones. If all prior data has already been sent when the switch occurs, this mark is not applied, leaving unacknowledged packets in the retransmit queue without a boundary. Later, when packet loss triggers a retransmit or selective acknowledgment, the kernel can merge an encrypted packet into an unencrypted one. For PSP this causes the merged data to be transmitted in cleartext; for TLS offload the malformed packet is rejected by the driver, stalling the connection permanently. The fix ensures the boundary mark is also placed on the retransmit queue and adds an encryption-status check before merging packets, closing both paths.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 4.18 | 5.10.273 | bf785a303e5f |
| 5.15 | 4.18 | 5.15.224 | 7061aafc680e |
| 6.1 | 4.18 | 6.1.191 | 533344a00ad9 |
| 6.12 | 4.18 | 6.12.112 | 1ae7aee39524 |
| 6.18 | 4.18 | 6.18.55 | 7ba87509c54c |
| 6.6 | 4.18 | 6.6.160 | 9e2a2f98e8c0 |
| 7.2 | 4.18 | 7.2.9 | 08e835f5ec6e |
| mainline | 4.18 | 7.3 | fc6d80eb5044 |
| cip/6.12 | 4.18 | 6.12.112-cip33 | 1ae7aee39524 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.112-cip33 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |