[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025100419-CVE-2025-39946-5f17@gregkh>
Date: Sat, 4 Oct 2025 09:33:30 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-39946: tls: make sure to abort the stream if headers are bogus
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2025-39946 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.0 with commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 and fixed in 6.1.154 with commit b36462146d86b1f22e594fe4dae611dffacfb203
Issue introduced in 6.0 with commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 and fixed in 6.6.108 with commit 4cefe5be73886f383639fe0850bb72d5b568a7b9
Issue introduced in 6.0 with commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 and fixed in 6.12.49 with commit 208640e6225cc929a05adbf79d1df558add3e231
Issue introduced in 6.0 with commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 and fixed in 6.16.9 with commit 61ca2da5fb8f433ce8bbd1657c84a86272133e6b
Issue introduced in 6.0 with commit 84c61fe1a75b4255df1e1e7c054c9e6d048da417 and fixed in 6.17 with commit 0aeb54ac4cd5cf8f60131b4d9ec0b6dc9c27b20d
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-39946
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/tls/tls.h
net/tls/tls_strp.c
net/tls/tls_sw.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/b36462146d86b1f22e594fe4dae611dffacfb203
https://git.kernel.org/stable/c/4cefe5be73886f383639fe0850bb72d5b568a7b9
https://git.kernel.org/stable/c/208640e6225cc929a05adbf79d1df558add3e231
https://git.kernel.org/stable/c/61ca2da5fb8f433ce8bbd1657c84a86272133e6b
https://git.kernel.org/stable/c/0aeb54ac4cd5cf8f60131b4d9ec0b6dc9c27b20d
Powered by blists - more mailing lists