CVE-2025-38524: rxrpc: Fix recv-recv race of completed call
In the Linux kernel, the following vulnerability has been resolved:
rxrpc: Fix recv-recv race of completed call
If a call receives an event (such as incoming data), the call gets placed on the socket's queue and a thread in recvmsg can be awakened to go and process it. Once the thread has picked up the call off of the queue, further events will cause it to be requeued, and once the socket lock is dropped (recvmsg uses call->usermutex to allow the socket to be used in parallel), a second thread can come in and its recvmsg can pop the call off the socket queue again.
In such a case, the first thread will be receiving stuff from the call and the second thread will be blocked on call->usermutex. The first thread can, at this point, process both the event that it picked call for and the event that the second thread picked the call for and may see the call terminate - in which case the call will be "released", decoupling the call from the user call ID assigned to it (RXRPCUSERCALLID in the control message).
The first thread will return okay, but then the second thread will wake up holding the usermutex and, if it sees that the call has been released by the first thread, it will BUG thusly:
kernel BUG at net/rxrpc/recvmsg.c:474!
Fix this by just dequeuing the call and ignoring it if it is seen to be already released. We can't tell userspace about it anyway as the user call ID has become stale.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.104.2-1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-38524?
CVE-2025-38524 is classified as a medium-severity vulnerability in the Linux kernel.
How do I fix CVE-2025-38524?
To fix CVE-2025-38524, update your Linux kernel to the latest version that includes the patch addressing this vulnerability.
What systems are affected by CVE-2025-38524?
CVE-2025-38524 affects various versions of the Linux kernel, making it necessary for users to check their specific kernel version.
What type of vulnerability is CVE-2025-38524?
CVE-2025-38524 is a race condition vulnerability related to the handling of incoming data in receive calls in the Linux kernel.
What impact does CVE-2025-38524 have on systems?
The impact of CVE-2025-38524 may include potential denial of service or data corruption due to improper handling of socket communication.