CVE-2026-142896: tls: avoid field-spanning write when copying crypto info

Published Dec 3, 2026
·
Updated

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

tls: avoid field-spanning write when copying crypto info

dotlssetsockoptconf() copies the cipher-specific part of the crypto info to cryptoinfo + 1, where cryptoinfo points at the 4-byte info member of union tlscryptocontext. When optval is a kernel sockptr, copyfromsockptroffset() is a memcpy(), and FORTIFYSOURCE 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 tlssetsockopt+0x9b2/0xa30, CPU#1: init/1 [ 7.001355] Call Trace: [ 7.003146] dosocksetsockopt+0xb0/0x190 [ 7.003975] syssetsockopt+0x76/0xc0 [ 7.005368] dosyscall64+0xda/0x4b0

tlssetsockopt() gets a kernel sockptr whenever a cgroup setsockopt BPF program is attached, even one that leaves the option alone, because cgroupbpfrunfiltersetsockopt() passes optval on in a kernel buffer. With a no-op program on the root cgroup, a plain TLSTX setsockopt() with AES-GCM-256 triggers the warning above on an x8664 build with CONFIGFORTIFYSOURCE.

Copy into the union at offset sizeof(struct tlscryptoinfo) instead. cryptoctx already points at the right union for both the first set and the TLS 1.3 rekey (tmp) case, and the address is unchanged.

Affected Software

6 affected componentsFixes available
Linux Linux kernel
linux/kernel>=5.9.0<6.1.193
6.1.193
linux/kernel>=6.2.0<6.6.163
6.6.163
linux/kernel>=6.7.0<6.12.119
6.12.119
linux/kernel>=6.13.0<6.18.65
6.18.65
linux/kernel>=6.19.0<7.3.6
7.3.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.1.193
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.6.163
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.119
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.65
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.6
  6. Compensating control

    In tls_setsockopt(), copy the crypto info into the union at offset sizeof(struct tls_crypto_info) instead of copying it to crypto_info + 1.

Event History

Dec 3, 2026
CVE Published
via MITRE·03:25 AM
Data Sourced
via MITRE·03:25 AM
Description
Data Sourced
via OSV·03:25 AM
DescriptionAffected Software
Data Sourced
via NVD·04:18 AM
Description

Frequently Asked Questions

1

What conditions trigger the warning?

The reported trigger is a TLS_TX setsockopt() using AES-GCM-256 when a cgroup setsockopt BPF program is attached. The BPF program does not need to modify the option; a no-op program attached to the root cgroup is sufficient.

2

How can I tell whether a system is affected?

On an x86_64 build with CONFIG_FORTIFY_SOURCE, the trigger produces a FORTIFY_SOURCE memcpy warning about a field-spanning write in include/linux/sockptr.h:49. The call trace includes tls_setsockopt(), do_sock_setsockopt(), and __sys_setsockopt().

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203