{"id":"CVE-2026-143154","summary":"tls: only install push_pending_record for a TX context","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ntls: only install push_pending_record for a TX context\n\ntls_set_sw_offload() assigns ctx-\u003epush_pending_record for both\ndirections, but the hook is a TX-side dispatcher. On a socket whose TX\nside is HW offloaded, tls_set_device_offload() installs\ntls_device_push_pending_record(); any later TLS_RX setsockopt\noverwrites it with tls_sw_push_pending_record(), because\ntls_set_device_offload_rx() itself calls tls_set_sw_offload(sk, 0, NULL)\nfor the software half of a successful HW RX offload, and so does the\nfallback when the RX offload is declined (NIC with TX-only offload,\ntls_dev_add() failure).\n\nFrom then on tls_handle_open_record() (a TLS_SET_RECORD_TYPE cmsg after\na MSG_MORE send, or the close path with a pending writer) runs\ntls_sw_push_pending_record() against priv_ctx_tx, which is a\nstruct tls_offload_context_tx, not a struct tls_sw_context_tx, and\nreads open_rec from inside the offload context. On x86_64 without lock\ndebugging that field overlays sg_tx_data[2].dma_address, which is never\nset, so the push is silently skipped and the data buffered by the\nMSG_MORE send is later sent under the cmsg's record type, e.g.\napplication data in a handshake or alert record. Enabling\nCONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_LOCK_ALLOC and CONFIG_LOCKDEP, but\nnot CONFIG_LOCK_STAT, in the tested x86_64 configuration moves open_rec\nover sg_tx_data[5].page_link. Once populated, its page pointer and\nscatterlist flags are interpreted as a tls_rec pointer and dereferenced\nwhile reading msg_plaintext.sg.size.\n\nOnly set the hook when initialising the TX side.\n\nFound by code review while developing TLS 1.3 HW offload rekey support.\n\nTested with HW TLS TX and RX offload on Mellanox ConnectX-6 Dx (Crypto\nEnabled): after setting TLS_RX, send() \"AAAA\" with MSG_MORE, then\nsendmsg() \"BBBB\" with a TLS_SET_RECORD_TYPE cmsg for a handshake\nrecord. Without this patch the peer receives a single handshake record\n\"AAAABBBB\"; with it, an application data record \"AAAA\" followed by a\nhandshake record \"BBBB\".","modified":"2026-12-03T11:01:26.312580264Z","published":"2026-12-03T09:19:55.971Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143154.json"},"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/18f4e9564c974f71fd542110accead449452e746"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2325edb8908f06b956acb8e45869ff465f9819ad"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2df23216d7ac87cc707a8c0a3665eb3ebca8c964"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5a3882bda2b37b30af5ab79d99a3def2d2176b6f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c47e766c5307c06a78304582b2b5b5ab01ee1358"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ef01c2770c81966221753a6c1c8b70b9efd80486"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143154.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143154"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"e8f69799810c32dd40c6724d829eccc70baad07f"},{"fixed":"5a3882bda2b37b30af5ab79d99a3def2d2176b6f"},{"fixed":"2df23216d7ac87cc707a8c0a3665eb3ebca8c964"},{"fixed":"ef01c2770c81966221753a6c1c8b70b9efd80486"},{"fixed":"2325edb8908f06b956acb8e45869ff465f9819ad"},{"fixed":"18f4e9564c974f71fd542110accead449452e746"},{"fixed":"c47e766c5307c06a78304582b2b5b5ab01ee1358"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143154.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.18.0"},{"fixed":"5.10.276"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.227"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.12.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143154.json"}}],"schema_version":"1.9.2"}