In the Linux kernel, the following vulnerability has been resolved: sctp: Prevent TOCTOU out-of-bounds write For the following path not holding the… (CVE-2025-40331)
A high-severity vulnerability in the Linux kernel SCTP implementation involves a time-of-check to time-of-use (TOCTOU) out-of-bounds write. The issue occurs in the sctp_diag_dump() path when the address list grows between buffer allocation and write, potentially leading to memory corruption. This vulnerability has been resolved in the Linux kernel.
AI Analysis
Technical Summary
CVE-2025-40331 is a vulnerability in the Linux kernel's SCTP subsystem where a TOCTOU condition allows an out-of-bounds write. Specifically, during the sctp_diag_dump() call chain (sctp_diag_dump() -> sctp_for_each_endpoint() -> sctp_ep_dump()), the code does not hold the socket lock and fails to ensure that the address list has not grown between the time the buffer is allocated (time-of-check) and when it is written to (time-of-use). This can cause memory corruption due to writing beyond allocated bounds. The vulnerability has been resolved in the Linux kernel.
Potential Impact
Successful exploitation can lead to out-of-bounds memory writes, resulting in potential system instability, denial of service, or privilege escalation due to memory corruption. The CVSS vector indicates local attack vector with low complexity, requiring low privileges and no user interaction, with high confidentiality, integrity, and availability impact.
Mitigation Recommendations
A fix for this vulnerability is available in the Linux kernel. Users and administrators should apply the official Linux kernel updates that address CVE-2025-40331 to remediate this issue. Patch status is not explicitly confirmed in the provided data, so verify with the Linux kernel vendor advisory for the exact fixed versions and update accordingly.
In the Linux kernel, the following vulnerability has been resolved: sctp: Prevent TOCTOU out-of-bounds write For the following path not holding the… (CVE-2025-40331)
Description
A high-severity vulnerability in the Linux kernel SCTP implementation involves a time-of-check to time-of-use (TOCTOU) out-of-bounds write. The issue occurs in the sctp_diag_dump() path when the address list grows between buffer allocation and write, potentially leading to memory corruption. This vulnerability has been resolved in the Linux kernel.
CVSS v3.1
Score 7.8high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2025-40331 is a vulnerability in the Linux kernel's SCTP subsystem where a TOCTOU condition allows an out-of-bounds write. Specifically, during the sctp_diag_dump() call chain (sctp_diag_dump() -> sctp_for_each_endpoint() -> sctp_ep_dump()), the code does not hold the socket lock and fails to ensure that the address list has not grown between the time the buffer is allocated (time-of-check) and when it is written to (time-of-use). This can cause memory corruption due to writing beyond allocated bounds. The vulnerability has been resolved in the Linux kernel.
Potential Impact
Successful exploitation can lead to out-of-bounds memory writes, resulting in potential system instability, denial of service, or privilege escalation due to memory corruption. The CVSS vector indicates local attack vector with low complexity, requiring low privileges and no user interaction, with high confidentiality, integrity, and availability impact.
Mitigation Recommendations
A fix for this vulnerability is available in the Linux kernel. Users and administrators should apply the official Linux kernel updates that address CVE-2025-40331 to remediate this issue. Patch status is not explicitly confirmed in the provided data, so verify with the Linux kernel vendor advisory for the exact fixed versions and update accordingly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-c4fm-qmm5-xqx8
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-40331"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a6b72d49c2644c7f8478f13
Added to database: 07/30/2026, 15:50:44 UTC
Last enriched: 07/30/2026, 17:53:55 UTC
Last updated: 09/10/2026, 19:38:44 UTC
Views: 14
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.