1. Archivio CVE
  2. 2025
  3. CVE-2025-23142

CVE-2025-23142

7.8 Gravità alta CVSS v3.1 · fonte NVD CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 7.8 – Alta

Descrizione

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]).

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
debian debian linux 11.0 –
linux linux kernel >= 3.18.128 < 3.19 –
linux linux kernel >= 4.4.166 < 4.5 –
linux linux kernel >= 4.9.142 < 4.10 –
linux linux kernel >= 4.14.85 < 4.15 –
linux linux kernel >= 4.19.6 < 5.4.293 –
linux linux kernel >= 5.5 < 5.10.237 –
linux linux kernel >= 5.11 < 5.15.181 –
linux linux kernel >= 5.16 < 6.1.135 –
linux linux kernel >= 6.2 < 6.6.88 –
linux linux kernel >= 6.7 < 6.12.24 –
linux linux kernel >= 6.13 < 6.13.12 –
linux linux kernel >= 6.14 < 6.14.3 –
linux linux kernel 6.15 rc1 –
Tutte le 24.085 vulnerabilità di Linux Kernel

Tipo di vulnerabilità

CWE-416 Uso di memoria dopo la liberazione (use after free)

Il prodotto usa o fa riferimento a un’area di memoria dopo averla liberata. Nel frattempo quell’area può essere stata assegnata ad altro: ogni operazione fatta con il vecchio puntatore agisce su dati che non le appartengono più.

Impatto sui sistemi

AmbitoImpatto
Integrità Modificare la memoria
Disponibilità Interruzione del servizio: arresto o riavvio
Riservatezza Leggere la memoria
Integrità, Riservatezza, Disponibilità Eseguire codice o comandi non autorizzati

Come si previene

Architettura e progettazione · Scelta del linguaggio Choose a language that provides automatic memory management.
Sviluppo · Riduzione della superficie di attacco When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 9.637 CVE di tipo CWE-416, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org