CVE-2025-40331
kernel: sctp: Prevent TOCTOU out-of-bounds write
Overview
Description
In the Linux kernel, the following vulnerability has been resolved:
sctp: Prevent TOCTOU out-of-bounds write
For the following path not holding the sock lock,
sctp_diag_dump() -> sctp_for_each_endpoint() -> sctp_ep_dump()
make sure not to exceed bounds in case the address list has grown
between buffer allocation (time-of-check) and write (time-of-use).
Source: OX vulnerability database
Severity
7.8 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 118 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | kernel | 0:6.6.117.1-1.azl3 |
Oracle Linux 3 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 7 | kernel-uek +7 | 5.4.17-2136.352.5.el7uek |
| 8 | bpftool +13 | 5.15.0-317.197.5.1.el8uek |
| 9 | bpftool +3 | 5.15.0-317.197.5.1.el9uek |
| 9 | kernel-uek +34 | 6.12.0-107.59.3.2.el9uek |
Photon OS 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | bpftool +9 | 5.10.247-1.ph4 |
| 5.0 | bpftool +10 | 6.1.159-1.ph5 |
Red Hat 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 8 | bpftool +45 | affected |
| 9 | bpftool +106 | affected |
SUSE Linux Enterprise 6 releases · 9 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | kgraft-patch-4-12-14-122-290-default | 1-8.7.1 | SUSE-SU-2026:0316-1 |
| 12.5 | cluster-md-kmp-default +13 | 4.12.14-122.290.1 | SUSE-SU-2026:0316-1 |
| 15.4 | kernel-livepatch-5-14-21-150400-24-194-default | 1-150400.9.7.1 | SUSE-SU-2026:0617-1 |
| 15.4 | cluster-md-kmp-default +17 | 5.14.21-150400.24.194.1 | SUSE-SU-2026:0617-1 |
| 15.4 | kernel-default-base | 5.14.21-150400.24.194.1.150400.24.98.3 | SUSE-SU-2026:0617-1 |
| 15.5 | kernel-livepatch-5-14-21-150500-55-133-default | 1-150500.11.3.1 | SUSE-SU-2026:0317-1 |
12 more rows
SUSE Linux Enterprise Micro 7 releases · 5 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.2 | kernel-rt +1 | 5.3.18-150300.232.1 | SUSE-SU-2026:0350-1 |
| 5.2 | kernel-default | 5.3.18-150300.59.232.1 | SUSE-SU-2026:0369-1 |
| 5.2 | kernel-default-base | 5.3.18-150300.59.232.1.150300.18.138.1 | SUSE-SU-2026:0369-1 |
| 5.3 | kernel-rt +1 | 5.14.21-150400.15.142.1 | SUSE-SU-2026:0411-1 |
| 5.3 | kernel-default | 5.14.21-150400.24.194.1 | SUSE-SU-2026:0617-1 |
| 5.3 | kernel-default-base | 5.14.21-150400.24.194.1.150400.24.98.3 | SUSE-SU-2026:0617-1 |
14 more rows
amazon linux 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | kernel-livepatch-6-1-159-181-297 +1 | 1:1.0-0.amzn2023 |
| 2023 | bpftool +20 | 1:6.1.159-181.297.amzn2023 |
| 2023 | bpftool6-12 +20 | 1:6.12.58-82.121.amzn2023 |
debian 4 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.247-1 |
| 11 | linux-6-1 | 6.1.159-1~deb11u1 |
| 12 | linux | 6.1.159-1 |
| 13 | linux | 6.12.63-1 |
| 14 | linux | 6.17.8-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 1 |
openSUSE Leap 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 16.0 | cluster-md-kmp-64kb +74 | 6.12.0-160000.9.1 | openSUSE-SU-2026:20145-1 |
| 16.0 | kernel-default-base | 6.12.0-160000.9.1.160000.2.6 | openSUSE-SU-2026:20145-1 |
root.io debian 3 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-linux | 5.10.247-1 |
| 12 | linux +1 | 6.1.159-1 |
| 13 | linux +1 | 6.12.63-1 |
root.io ubuntu 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 22.04 | linux +1 | 5.15.0-173.183 |
| 24.04 | linux +1 | 6.8.0-106.106 |
ubuntu 4 releases · 42 packages
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | linux +12 | affected |
| 20.04-ESM | linux +10 | affected |
| 20.04-ESM | linux-nvidia-tegra-5-15 | 5.15.0-1055.55~20.04.1 |
| 20.04-ESM | linux-ibm-5-15 | 5.15.0-1097.100~20.04.1 |
| 20.04-ESM | linux-riscv-5-15 | 5.15.0-1097.101~20.04.1 |
| 20.04-ESM | linux-intel-iotg-5-15 | 5.15.0-1098.104~20.04.1 |
49 more rows
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-40331
- git.kernel.org https://git.kernel.org/linus/95aef86ab231f047bb8085c70666059b58f53c09 (6.18-rc5)
- git.kernel.org https://git.kernel.org/stable/c/2fe08fcaacb7eb019fa9c81db39b2214de216677
- git.kernel.org https://git.kernel.org/stable/c/3006959371007fc2eae4a078f823c680fa52de1a
- git.kernel.org https://git.kernel.org/stable/c/584307275b2048991b2e8984962189b6cc0a9b85
- git.kernel.org https://git.kernel.org/stable/c/72e3fea68eac8d088e44c3dd954e843478e9240e
- git.kernel.org https://git.kernel.org/stable/c/89eac1e150dbd42963e13d23828cb8c4e0763196
- git.kernel.org https://git.kernel.org/stable/c/95aef86ab231f047bb8085c70666059b58f53c09
- git.kernel.org https://git.kernel.org/stable/c/b106a68df0650b694b254427cd9250c04500edd3
- git.kernel.org https://git.kernel.org/stable/c/c9119f243d9c0da3c3b5f577a328de3e7ffd1b42
Show all 40 references
- linux.oracle.com https://linux.oracle.com/cve/CVE-2025-40331.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2026-50113.html
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2025120910-CVE-2025-40331-ee3c@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-40331
- ubuntu.com https://ubuntu.com/security/notices/USN-8029-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8029-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8029-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8030-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8048-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-4
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-5
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-4
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-5
- ubuntu.com https://ubuntu.com/security/notices/USN-8100-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8116-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8125-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8126-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8141-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8163-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8163-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8165-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8243-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8261-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-40331
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.