CVE-2025-39946
tls: make sure to abort the stream if headers are bogus
CVSS 9.8 CRITICALEPSS 9.1%
Em resumo
Uma falha no suporte a TLS do kernel Linux permite que um atacante cause um estouro de buffer ao enviar cabeçalhos de registros TLS malformados em pequenos fragmentos seguidos de dados grandes, podendo derrubar o sistema ou executar código.
Detalhe técnico
A vulnerabilidade existe na análise de registros TLS quando o kernel armazena registros incompletos e tenta se recuperar re-analisando com dados adicionais do socket. Um atacante pode explorar isso enviando cabeçalhos fragmentados e inválidos seguidos de um grande payload, causando estouro do espaço skb alocado quando o parser tenta novamente. O problema ocorre porque tls_rx_msg_size() não aborta o stream parser (strp) ao detectar registros inválidos, permitindo processamento contínuo de dados corrompidos.
Resumo gerado e traduzido por IA a partir da descrição 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