CVE-2025-38112

net: Fix TOCTOU issue in sk_is_readable()

State
Published
Severity
Not scored
Published
Jul 3, 2025
Updated
May 11, 2026
Reserved
Apr 16, 2025

Read the record on cve.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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 8934ce2fd08171e8605f7fada91ee7619fe17ab8 to before c2b26638476baee154920bb587fc94ff1bf04336Affected
  • 8934ce2fd08171e8605f7fada91ee7619fe17ab8 to before 6fa68d7eab34d448a61aa24ea31e68b3231ed20dAffected
  • 8934ce2fd08171e8605f7fada91ee7619fe17ab8 to before 8926a7ef1977a832dd6bf702f1a99303dbf15b15Affected
  • 8934ce2fd08171e8605f7fada91ee7619fe17ab8 to before ff55c85a923e043d59d26b20a673a1b4a219c310Affected
  • 8934ce2fd08171e8605f7fada91ee7619fe17ab8 to before 1e0de7582ceccbdbb227d4e0ddf65732f92526daAffected
  • 8934ce2fd08171e8605f7fada91ee7619fe17ab8 to before 1b367ba2f94251822577daed031d6b9a9e11ba91Affected
  • 8934ce2fd08171e8605f7fada91ee7619fe17ab8 to before 2660a544fdc0940bba15f70508a46cf9a6491230Affected
LinuxLinux
  • 4.17Affected
  • before 4.17Not affected
  • 5.10.239 through 5.10.*Not affected
  • 5.15.186 through 5.15.*Not affected
  • 6.1.142 through 6.1.*Not affected
  • 6.6.94 through 6.6.*Not affected
  • 6.12.34 through 6.12.*Not affected
  • 6.15.3 through 6.15.*Not affected
  • 6.16 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.