tls: avoid field-spanning write when copying crypto info

Summary

CVECVE-2026-142896
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-12-03 04:18:28 UTC
Updated2026-12-03 04:18:28 UTC
DescriptionIn the Linux kernel, the following vulnerability has been resolved: tls: avoid field-spanning write when copying crypto info do_tls_setsockopt_conf() copies the cipher-specific part of the crypto info to crypto_info + 1, where crypto_info points at the 4-byte info member of union tls_crypto_context. When optval is a kernel sockptr, copy_from_sockptr_offset() is a memcpy(), and FORTIFY_SOURCE bounds the destination by that member: [ 6.948348] memcpy: detected field-spanning write (size 52) of single field "dst" at include/linux/sockptr.h:49 (size 0) [ 6.948480] WARNING: include/linux/sockptr.h:49 at tls_setsockopt+0x9b2/0xa30, CPU#1: init/1 [ 7.001355] Call Trace: [ 7.003146] do_sock_setsockopt+0xb0/0x190 [ 7.003975] __sys_setsockopt+0x76/0xc0 [ 7.005368] do_syscall_64+0xda/0x4b0 tls_setsockopt() gets a kernel sockptr whenever a cgroup setsockopt BPF program is attached, even one that leaves the option alone, because __cgroup_bpf_run_filter_setsockopt() passes optval on in a kernel buffer. With a no-op program on the root cgroup, a plain TLS_TX setsockopt() with AES-GCM-256 triggers the warning above on an x86_64 build with CONFIG_FORTIFY_SOURCE. Copy into the union at offset sizeof(struct tls_crypto_info) instead. crypto_ctx already points at the right union for both the first set and the TLS 1.3 rekey (tmp) case, and the address is unchanged.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected a7b75c5a8c41445f33efb663887ff5f5c3b4454b b92cd530e692fceff6c40187c700e94033fe5f9c git Not specified
CNA Linux Linux affected a7b75c5a8c41445f33efb663887ff5f5c3b4454b 202c9cb2130528f0ce9845b0f04879ee75d78a3c git Not specified
CNA Linux Linux affected a7b75c5a8c41445f33efb663887ff5f5c3b4454b c72fbed869f9fc1048323d6b90c462c4e14d95c2 git Not specified
CNA Linux Linux affected a7b75c5a8c41445f33efb663887ff5f5c3b4454b 7a55f31d959668bcc072e33b2e6ae3313f21d600 git Not specified
CNA Linux Linux affected a7b75c5a8c41445f33efb663887ff5f5c3b4454b 69bb302af0ee1b570a49689970367ccfee406b1c git Not specified
CNA Linux Linux affected a7b75c5a8c41445f33efb663887ff5f5c3b4454b c43c1c24f3cdc0d2d3f59e5686573ac3129637aa git Not specified
CNA Linux Linux affected 5.9 Not specified
CNA Linux Linux unaffected 5.9 semver Not specified
CNA Linux Linux unaffected 6.1.193 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.163 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.119 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.65 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.6 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc1 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/202c9cb2130528f0ce9845b0f04879ee75d78a3c 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/c43c1c24f3cdc0d2d3f59e5686573ac3129637aa 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/69bb302af0ee1b570a49689970367ccfee406b1c 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/b92cd530e692fceff6c40187c700e94033fe5f9c 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/c72fbed869f9fc1048323d6b90c462c4e14d95c2 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/7a55f31d959668bcc072e33b2e6ae3313f21d600 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

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report