Bug 2376039 (CVE-2025-38112) - CVE-2025-38112 kernel: net: Fix TOCTOU issue in sk_is_readable()
Summary: CVE-2025-38112 kernel: net: Fix TOCTOU issue in sk_is_readable()
Keywords:
Status: NEW
Alias: CVE-2025-38112
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-03 09:01 UTC by OSIDB Bzimport
Modified: 2025-07-03 20:05 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-07-03 09:01:43 UTC
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.

Comment 1 Avinash Hanwate 2025-07-03 19:56:47 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025070324-CVE-2025-38112-57a2@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.