CVE-2025-39946
tls: make sure to abort the stream if headers are bogus
CVSS 9.8 CRITICALEPSS 9.1%
En resumen
Una falla en la implementación de TLS del kernel Linux permite que un atacante cause un desbordamiento de búfer al enviar encabezados de registro TLS malformados en fragmentos pequeños seguidos de datos grandes, lo que podría bloquear el sistema o ejecutar código.
Detalle técnico
La vulnerabilidad existe en el análisis de registros TLS cuando el kernel almacena registros incompletos e intenta recuperarse reparse-ando con datos adicionales del socket. Un atacante puede explotar esto enviando encabezados fragmentados e inválidos seguidos de un payload grande, causando desbordamiento del espacio skb asignado cuando el parser reintentas. El problema ocurre porque tls_rx_msg_size() no aborta el analizador de stream (strp) al detectar registros inválidos, permitiendo el procesamiento continuo de datos corrupto.
Resumen generado y traducido por IA a partir de la descripción oficial.
In the Linux kernel, the following vulnerability has been resolved:
tls: make sure to abort the stream if headers are bogus
Normally we wait for the socket to buffer up the whole record
before we service it. If the socket has a tiny buffer, however,
we read out the data sooner, to prevent connection stalls.
Make sure that we abort the connection when we find out late
that the record is actually invalid. Retrying the parsing is
fine in itself but since we copy some more data each time
before we parse we can overflow the allocated skb space.
Constructing a scenario in which we're under pressure without
enough data in the socket to parse the length upfront is quite
hard. syzbot figured out a way to do this by serving us the header
in small OOB sends, and then filling in the recvbuf with a large
normal send.
Make sure that tls_rx_msg_size() aborts strp, if we reach
an invalid record there's really no way to recover.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H