Bug 2363300 (CVE-2025-23142) - CVE-2025-23142 kernel: Linux kernel: SCTP use-after-free due to race condition in sendmsg
Summary: CVE-2025-23142 kernel: Linux kernel: SCTP use-after-free due to race conditio...
Keywords:
Status: NEW
Alias: CVE-2025-23142
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-01 14:02 UTC by OSIDB Bzimport
Modified: 2026-01-28 00:29 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2026:0457 0 None None None 2026-01-12 13:28:59 UTC
Red Hat Product Errata RHSA-2026:0489 0 None None None 2026-01-13 09:28:03 UTC
Red Hat Product Errata RHSA-2026:0537 0 None None None 2026-01-14 00:07:19 UTC
Red Hat Product Errata RHSA-2026:0576 0 None None None 2026-01-14 09:47:27 UTC
Red Hat Product Errata RHSA-2026:1441 0 None None None 2026-01-28 00:29:19 UTC
Red Hat Product Errata RHSA-2026:1443 0 None None None 2026-01-28 00:22:15 UTC

Description OSIDB Bzimport 2025-05-01 14:02:52 UTC
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]).

Comment 1 Avinash Hanwate 2025-05-02 06:19:20 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025050124-CVE-2025-23142-ac59@gregkh/T

Comment 3 errata-xmlrpc 2026-01-12 13:28:57 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.6 Extended Update Support

Via RHSA-2026:0457 https://access.redhat.com/errata/RHSA-2026:0457

Comment 4 errata-xmlrpc 2026-01-13 09:28:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.4 Extended Update Support

Via RHSA-2026:0489 https://access.redhat.com/errata/RHSA-2026:0489

Comment 5 errata-xmlrpc 2026-01-14 00:07:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2026:0537 https://access.redhat.com/errata/RHSA-2026:0537

Comment 6 errata-xmlrpc 2026-01-14 09:47:26 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2026:0576 https://access.redhat.com/errata/RHSA-2026:0576

Comment 7 errata-xmlrpc 2026-01-28 00:22:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2026:1443 https://access.redhat.com/errata/RHSA-2026:1443

Comment 8 errata-xmlrpc 2026-01-28 00:29:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2026:1441 https://access.redhat.com/errata/RHSA-2026:1441


Note You need to log in before you can comment on or make changes to this bug.