tls: only install push_pending_record for a TX context
Summary
| CVE | CVE-2026-143154 |
| State | PUBLISHED |
| Assigner | Linux |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-12-03 10:17:50 UTC |
| Updated | 2026-12-03 10:17:50 UTC |
| Description | In the Linux kernel, the following vulnerability has been resolved:
tls: only install push_pending_record for a TX context
tls_set_sw_offload() assigns ctx->push_pending_record for both
directions, but the hook is a TX-side dispatcher. On a socket whose TX
side is HW offloaded, tls_set_device_offload() installs
tls_device_push_pending_record(); any later TLS_RX setsockopt
overwrites it with tls_sw_push_pending_record(), because
tls_set_device_offload_rx() itself calls tls_set_sw_offload(sk, 0, NULL)
for the software half of a successful HW RX offload, and so does the
fallback when the RX offload is declined (NIC with TX-only offload,
tls_dev_add() failure).
From then on tls_handle_open_record() (a TLS_SET_RECORD_TYPE cmsg after
a MSG_MORE send, or the close path with a pending writer) runs
tls_sw_push_pending_record() against priv_ctx_tx, which is a
struct tls_offload_context_tx, not a struct tls_sw_context_tx, and
reads open_rec from inside the offload context. On x86_64 without lock
debugging that field overlays sg_tx_data[2].dma_address, which is never
set, so the push is silently skipped and the data buffered by the
MSG_MORE send is later sent under the cmsg's record type, e.g.
application data in a handshake or alert record. Enabling
CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_LOCK_ALLOC and CONFIG_LOCKDEP, but
not CONFIG_LOCK_STAT, in the tested x86_64 configuration moves open_rec
over sg_tx_data[5].page_link. Once populated, its page pointer and
scatterlist flags are interpreted as a tls_rec pointer and dereferenced
while reading msg_plaintext.sg.size.
Only set the hook when initialising the TX side.
Found by code review while developing TLS 1.3 HW offload rekey support.
Tested with HW TLS TX and RX offload on Mellanox ConnectX-6 Dx (Crypto
Enabled): after setting TLS_RX, send() "AAAA" with MSG_MORE, then
sendmsg() "BBBB" with a TLS_SET_RECORD_TYPE cmsg for a handshake
record. Without this patch the peer receives a single handshake record
"AAAABBBB"; with it, an application data record "AAAA" followed by a
handshake record "BBBB". |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|
| CNA |
Linux |
Linux |
affected e8f69799810c32dd40c6724d829eccc70baad07f 5a3882bda2b37b30af5ab79d99a3def2d2176b6f git |
Not specified |
| CNA |
Linux |
Linux |
affected e8f69799810c32dd40c6724d829eccc70baad07f 2df23216d7ac87cc707a8c0a3665eb3ebca8c964 git |
Not specified |
| CNA |
Linux |
Linux |
affected e8f69799810c32dd40c6724d829eccc70baad07f ef01c2770c81966221753a6c1c8b70b9efd80486 git |
Not specified |
| CNA |
Linux |
Linux |
affected e8f69799810c32dd40c6724d829eccc70baad07f 2325edb8908f06b956acb8e45869ff465f9819ad git |
Not specified |
| CNA |
Linux |
Linux |
affected e8f69799810c32dd40c6724d829eccc70baad07f 18f4e9564c974f71fd542110accead449452e746 git |
Not specified |
| CNA |
Linux |
Linux |
affected e8f69799810c32dd40c6724d829eccc70baad07f c47e766c5307c06a78304582b2b5b5ab01ee1358 git |
Not specified |
| CNA |
Linux |
Linux |
affected 4.18 |
Not specified |
| CNA |
Linux |
Linux |
unaffected 4.18 semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 5.10.276 5.10.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 5.15.227 5.15.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.12.120 6.12.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.18.66 6.18.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 7.3.7 7.3.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 7.4-rc3 * original_commit_for_fix |
Not specified |
References
| Reference | Source | Link | Tags |
|---|
| git.kernel.org/stable/c/2df23216d7ac87cc707a8c0a3665eb3ebca8c964 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/c47e766c5307c06a78304582b2b5b5ab01ee1358 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/18f4e9564c974f71fd542110accead449452e746 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/ef01c2770c81966221753a6c1c8b70b9efd80486 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/2325edb8908f06b956acb8e45869ff465f9819ad |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/5a3882bda2b37b30af5ab79d99a3def2d2176b6f |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| CVE Program record |
CVE.ORG |
www.cve.org |
canonical |
| NVD vulnerability detail |
NVD |
nvd.nist.gov |
canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.