CVE-2025-38524

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->user_mutex 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->user_mutex. 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 (RXRPC_USER_CALL_ID in the control message). The first thread will return okay, but then the second thread will wake up holding the user_mutex 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.
CVSS

No CVSS.

Configurations

No configuration.

History

18 Aug 2025, 20:16

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: rxrpc: Corregir la ejecución recv-recv de la llamada completada. Si una llamada recibe un evento (como datos entrantes), la llamada se coloca en la cola del socket y se puede despertar un hilo en recvmsg para que la procese. Una vez que el hilo ha recogido la llamada de la cola, eventos posteriores harán que se vuelva a poner en cola, y una vez que se libera el bloqueo del socket (recvmsg usa call->user_mutex para permitir que el socket se use en paralelo), un segundo hilo puede entrar y su recvmsg puede sacar la llamada de la cola del socket nuevamente. En tal caso, el primer hilo recibirá cosas de la llamada y el segundo hilo se bloqueará en call->user_mutex. En este punto, el primer hilo puede procesar tanto el evento para el que seleccionó la llamada como el evento para el que el segundo hilo la seleccionó, y podría ver que la llamada termina. En ese caso, la llamada se "liberará", desvinculándola del ID de llamada de usuario que se le asignó (RXRPC_USER_CALL_ID en el mensaje de control). El primer hilo retornará correctamente, pero el segundo hilo se reactivará con el user_mutex y, si detecta que el primer hilo ha liberado la llamada, generará el siguiente error: ¡error del kernel en net/rxrpc/recvmsg.c:474! Para solucionar esto, simplemente retire la llamada de la cola e ignore si ya está liberada. De todos modos, no podemos informar al espacio de usuario, ya que el ID de llamada de usuario ha quedado obsoleto.

16 Aug 2025, 12:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-08-16 12:15

Updated : 2025-08-18 20:16


NVD link : CVE-2025-38524

Mitre link : CVE-2025-38524

CVE.ORG link : CVE-2025-38524


JSON object : View

Products Affected

No product.

CWE

No CWE.