[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025070324-CVE-2025-38112-57a2@gregkh>
Date: Thu, 3 Jul 2025 10:35:29 +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-38112: net: Fix TOCTOU issue in sk_is_readable()
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: Fix TOCTOU issue in sk_is_readable()
sk->sk_prot->sock_is_readable is a valid function pointer when sk resides
in a sockmap. After the last sk_psock_put() (which usually happens when
socket is removed from sockmap), sk->sk_prot gets restored and
sk->sk_prot->sock_is_readable becomes NULL.
This makes sk_is_readable() racy, if the value of sk->sk_prot is reloaded
after the initial check. Which in turn may lead to a null pointer
dereference.
Ensure the function pointer does not turn NULL after the check.
The Linux kernel CVE team has assigned CVE-2025-38112 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 5.10.239 with commit c2b26638476baee154920bb587fc94ff1bf04336
Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 5.15.186 with commit 6fa68d7eab34d448a61aa24ea31e68b3231ed20d
Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.1.142 with commit 8926a7ef1977a832dd6bf702f1a99303dbf15b15
Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.6.94 with commit ff55c85a923e043d59d26b20a673a1b4a219c310
Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.12.34 with commit 1e0de7582ceccbdbb227d4e0ddf65732f92526da
Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.15.3 with commit 1b367ba2f94251822577daed031d6b9a9e11ba91
Issue introduced in 4.17 with commit 8934ce2fd08171e8605f7fada91ee7619fe17ab8 and fixed in 6.16-rc2 with commit 2660a544fdc0940bba15f70508a46cf9a6491230
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-38112
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:
include/net/sock.h
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/c2b26638476baee154920bb587fc94ff1bf04336
https://git.kernel.org/stable/c/6fa68d7eab34d448a61aa24ea31e68b3231ed20d
https://git.kernel.org/stable/c/8926a7ef1977a832dd6bf702f1a99303dbf15b15
https://git.kernel.org/stable/c/ff55c85a923e043d59d26b20a673a1b4a219c310
https://git.kernel.org/stable/c/1e0de7582ceccbdbb227d4e0ddf65732f92526da
https://git.kernel.org/stable/c/1b367ba2f94251822577daed031d6b9a9e11ba91
https://git.kernel.org/stable/c/2660a544fdc0940bba15f70508a46cf9a6491230
Powered by blists - more mailing lists