CVE-2025-38112: net: Fix TOCTOU issue in sk_is_readable()
In the Linux kernel, the following vulnerability has been resolved:
net: Fix TOCTOU issue in skisreadable()
sk->skprot->sockisreadable is a valid function pointer when sk resides in a sockmap. After the last skpsockput() (which usually happens when socket is removed from sockmap), sk->skprot gets restored and sk->skprot->sockisreadable becomes NULL.
This makes skisreadable() racy, if the value of sk->skprot 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-38112?
CVE-2025-38112 is classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2025-38112?
To fix CVE-2025-38112, update the Linux kernel to the latest stable version that addresses this vulnerability.
What systems are affected by CVE-2025-38112?
CVE-2025-38112 affects Linux kernel versions that include the vulnerable code related to socket management.
What is the nature of CVE-2025-38112?
CVE-2025-38112 is a TOCTOU (time-of-check to time-of-use) vulnerability affecting socket readability checks.
Is there a workaround for CVE-2025-38112?
There is no known workaround for CVE-2025-38112; updating the kernel is the recommended action.