CVE-2025-23142

In the Linux kernel, the following vulnerability has been resolved: sctp: detect and prevent references to a freed transport in sendmsg sctp_sendmsg() re-uses associations and transports when possible by doing a lookup based on the socket endpoint and the message destination address, and then sctp_sendmsg_to_asoc() sets the selected transport in all the message chunks to be sent. There's a possible race condition if another thread triggers the removal of that selected transport, for instance, by explicitly unbinding an address with setsockopt(SCTP_SOCKOPT_BINDX_REM), after the chunks have been set up and before the message is sent. This can happen if the send buffer is full, during the period when the sender thread temporarily releases the socket lock in sctp_wait_for_sndbuf(). This causes the access to the transport data in sctp_outq_select_transport(), when the association outqueue is flushed, to result in a use-after-free read. This change avoids this scenario by having sctp_transport_free() signal the freeing of the transport, tagging it as "dead". In order to do this, the patch restores the "dead" bit in struct sctp_transport, which was removed in commit 47faa1e4c50e ("sctp: remove the dead field of sctp_transport"). Then, in the scenario where the sender thread has released the socket lock in sctp_wait_for_sndbuf(), the bit is checked again after re-acquiring the socket lock to detect the deletion. This is done while holding a reference to the transport to prevent it from being freed in the process. If the transport was deleted while the socket lock was relinquished, sctp_sendmsg_to_asoc() will return -EAGAIN to let userspace retry the send. The bug was found by a private syzbot instance (see the error report [1] and the C reproducer that triggers it [2]).
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*

Configuration 2 (hide)

cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

History

05 Nov 2025, 22:04

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/0f7df4899299ce4662e5f95badb9dbc57cc37fa5 - () https://git.kernel.org/stable/c/0f7df4899299ce4662e5f95badb9dbc57cc37fa5 - Patch
References () https://git.kernel.org/stable/c/2e5068b7e0ae0a54f6cfd03a2f80977da657f1ee - () https://git.kernel.org/stable/c/2e5068b7e0ae0a54f6cfd03a2f80977da657f1ee - Patch
References () https://git.kernel.org/stable/c/3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8 - () https://git.kernel.org/stable/c/3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8 - Patch
References () https://git.kernel.org/stable/c/547762250220325d350d0917a7231480e0f4142b - () https://git.kernel.org/stable/c/547762250220325d350d0917a7231480e0f4142b - Patch
References () https://git.kernel.org/stable/c/5bc83bdf5f5b8010d1ca5a4555537e62413ab4e2 - () https://git.kernel.org/stable/c/5bc83bdf5f5b8010d1ca5a4555537e62413ab4e2 - Patch
References () https://git.kernel.org/stable/c/7a63f4fb0efb4e69efd990cbb740a848679ec4b0 - () https://git.kernel.org/stable/c/7a63f4fb0efb4e69efd990cbb740a848679ec4b0 - Patch
References () https://git.kernel.org/stable/c/9e7c37fadb3be1fc33073fcf10aa96d166caa697 - () https://git.kernel.org/stable/c/9e7c37fadb3be1fc33073fcf10aa96d166caa697 - Patch
References () https://git.kernel.org/stable/c/c6fefcb71d246baaf3bacdad1af7ff50ebcfe652 - () https://git.kernel.org/stable/c/c6fefcb71d246baaf3bacdad1af7ff50ebcfe652 - Patch
References () https://git.kernel.org/stable/c/f1a69a940de58b16e8249dff26f74c8cc59b32be - () https://git.kernel.org/stable/c/f1a69a940de58b16e8249dff26f74c8cc59b32be - Patch
References () https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html - () https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html - Mailing List, Third Party Advisory
References () https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html - () https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html - Mailing List, Third Party Advisory
CWE CWE-416
First Time Debian debian Linux
Linux
Debian
Linux linux Kernel
CPE cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8

03 Nov 2025, 20:17

Type Values Removed Values Added
References
  • () https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html -
  • () https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html -

02 May 2025, 13:53

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: sctp: detectar y prevenir referencias a un transporte liberado en sendmsg. sctp_sendmsg() reutiliza asociaciones y transportes cuando es posible mediante una búsqueda basada en el endpoint del socket y la dirección de destino del mensaje. A continuación, sctp_sendmsg_to_asoc() establece el transporte seleccionado en todos los fragmentos de mensaje que se enviarán. Existe una posible condición de ejecución si otro subproceso activa la eliminación de ese transporte seleccionado, por ejemplo, desvinculando explícitamente una dirección con setsockopt(SCTP_SOCKOPT_BINDX_REM), después de configurar los fragmentos y antes de enviar el mensaje. Esto puede ocurrir si el búfer de envío está lleno, durante el periodo en que el subproceso emisor libera temporalmente el bloqueo del socket en sctp_wait_for_sndbuf(). Esto provoca que el acceso a los datos de transporte en sctp_outq_select_transport(), al vaciar la cola de salida de la asociación, resulte en una lectura de use-after-free. Este cambio evita este escenario al indicar sctp_transport_free() la liberación del transporte, etiquetándolo como "muerto". Para ello, el parche restaura el bit "muerto" en la estructura sctp_transport, que se eliminó en el commit 47faa1e4c50e ("sctp: eliminar el campo muerto de sctp_transport"). Si el hilo emisor ha liberado el bloqueo del socket en sctp_wait_for_sndbuf(), el bit se vuelve a comprobar tras volver a adquirir el bloqueo para detectar la eliminación. Esto se realiza manteniendo una referencia al transporte para evitar que se libere durante el proceso. Si el transporte se eliminó mientras se liberaba el bloqueo del socket, sctp_sendmsg_to_asoc() devolverá -EAGAIN para que el espacio de usuario pueda reintentar el envío. El error fue detectado por una instancia privada de syzbot (consulte el informe de errores [1] y el reproductor de C que lo activa [2]).

02 May 2025, 07:16

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/0f7df4899299ce4662e5f95badb9dbc57cc37fa5 -
  • () https://git.kernel.org/stable/c/3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8 -
  • () https://git.kernel.org/stable/c/547762250220325d350d0917a7231480e0f4142b -

01 May 2025, 13:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-05-01 13:15

Updated : 2025-11-05 22:04


NVD link : CVE-2025-23142

Mitre link : CVE-2025-23142

CVE.ORG link : CVE-2025-23142


JSON object : View

Products Affected

debian

  • debian_linux

linux

  • linux_kernel
CWE
CWE-416

Use After Free