Executive brief
A vulnerability was identified in the Linux kernel's networking component responsible for the SCTP protocol. A local attacker could potentially cause a system crash or gain unauthorized access to memory by exploiting a timing issue when the system reports network diagnostic information. This occurs because the system does not properly lock data while measuring and then writing address information, leading to a memory corruption scenario.
Technical details
A TOCTOU (Time-of-Check to Time-of-Use) vulnerability exists in net/sctp/diag.c within the Linux kernel. The functions sctp_diag_dump(), sctp_for_each_endpoint(), and sctp_ep_dump() do not hold the socket lock during execution. This allows the address list to grow between the initial buffer allocation (check) and the subsequent write operation (use), resulting in an out-of-bounds write. A local user with sufficient privileges to invoke SCTP diagnostics can exploit this to corrupt kernel memory. The issue has been resolved by adding a check to ensure the address count does not exceed the allocated buffer size during the fill operation.
Affected products
- Linux Linux Kernel 4.7 to 5.4.302, 5.10.247, 5.15.197, 6.1.159, 6.6.76, 6.12.4, 6.13-rc1
Timeline
- 2025-12-09: disclosed
- 2025-12-09: advisory
References
- https://git.kernel.org/stable/c/2fe08fcaacb7eb019fa9c81db39b2214de216677
- https://git.kernel.org/stable/c/3006959371007fc2eae4a078f823c680fa52de1a
- https://git.kernel.org/stable/c/584307275b2048991b2e8984962189b6cc0a9b85
- https://git.kernel.org/stable/c/72e3fea68eac8d088e44c3dd954e843478e9240e
- https://git.kernel.org/stable/c/89eac1e150dbd42963e13d23828cb8c4e0763196
- https://git.kernel.org/stable/c/95aef86ab231f047bb8085c70666059b58f53c09
- https://git.kernel.org/stable/c/b106a68df0650b694b254427cd9250c04500edd3