VDB

CVE-2025-23142

CVE-2025-23142 PUBLISHED CVSS 7.8 HIGH

sctp: detect and prevent references to a freed transport in sendmsg

Reported by linux · Published May 1, 2025

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

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel-headersAmazon Linux6.1.140-154.222.amzn2023
perf6.12Amazon Linux6.12.25-32.101.amzn2023
python3-perfAmazon Linux6.1.140-154.222.amzn2023
kernel-tools-develAmazon Linux6.1.140-154.222.amzn2023
kernel6.12Amazon Linux6.12.25-32.101.amzn2023
LinuxLinuxf1a69a940de58b16e8249dff26f74c8cc59b32be, c6fefcb71d246baaf3bacdad1af7ff50ebcfe652, 9e7c37fadb3be1fc33073fcf10aa96d166caa697, 5bc83bdf5f5b8010d1ca5a4555537e62413ab4e2, 4.20, 3257386be6a7eb8a8bfc9cbfb746df4eb4fc70e8, 0f7df4899299ce4662e5f95badb9dbc57cc37fa5

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinuxdf132eff463873e14e019a07f387b4d577d6d1f9, df132eff463873e14e019a07f387b4d577d6d1f9, df132eff463873e14e019a07f387b4d577d6d1f9
LinuxLinux4.20, 0, 5.4.293
amazon:2023kernel-headers0
amazon:2023perf6.120
amazon:2023python3-perf0
amazon:2023kernel-tools-devel0
amazon:2023kernel6.120
LinuxLinux5.15.181, 6.1.135, 6.6.88
amazon:2023python3-perf6.120
amazon:2023kernel-tools0
amazon:2023kernel-libbpf0
amazon:2023kernel-modules-extra0
amazon:2023bpftool0
amazon:2023perf0
linuxlinux_kernel4.19.6, 4.20, 4.20
amazon:2023kernel-livepatch-6.12.25-32.1010
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-devel0
amazon:2023kernel-livepatch-6.1.140-154.2220
amazon:2023kernel-modules-extra-common0

…and 3 more

Timeline

  • May 1, 2025 Coalition ESS Score (19 in total, the first dated here)
  • May 1, 2025 CVE Published
  • May 2, 2025 EPSS Score (30 in total, the first dated here)
  • Oct 12, 2025 PoC Published (5 in total, the first dated here)
  • Dec 21, 2025 Security Advisory (272 in total, the first dated here)
  • Mar 29, 2026 Distribution Patch (233 in total, the first dated here)
  • Jul 30, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-23142
vulnetix vdb fixes CVE-2025-23142

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-23142/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›