Executive brief
A vulnerability in the Linux kernel's networking component could allow a local user to crash the system. The issue occurs when the system attempts to access network configuration data while a process is exiting, leading to a 'kernel oops' or system crash. This impacts the availability of the server but does not directly expose customer data.
Technical details
A NULL pointer dereference (CWE-476) exists in net/sctp/sysctl.c within the proc_sctp_do_hmac_alg function. The vulnerability is caused by the code incorrectly using 'current->nsproxy' to access the network namespace ('net') structure. In certain race conditions, such as when a task is exiting (e.g., during an acct(2) syscall), 'current->nsproxy' can be NULL, leading to a kernel panic. The fix involves obtaining the 'net' structure via 'container_of()' from the 'table->data' pointer instead of the 'current' task proxy. This issue was resolved in multiple stable branches including 6.1.125, 6.6.72, 6.12.10, and the 6.13-rc series.
Affected products
- Linux Linux Kernel 3.8 to 6.1.125, 6.2 to 6.6.72, 6.7 to 6.12.10, 6.13-rc1 to 6.13-rc6
Timeline
- 2025-01-08: other: Patch authored
- 2025-01-19: advisory: CVE-2025-21640 published
- 2025-01-23: patched: Merged into stable kernel trees
References
- https://git.kernel.org/stable/c/03ca51faba2b017bf6c90e139434c4117d0afcdc
- https://git.kernel.org/stable/c/3cd0659deb9c03535fd61839e91d4d4d3e51ac71
- https://git.kernel.org/stable/c/5599b212d2f4466e1832a94e9932684aaa364587
- https://git.kernel.org/stable/c/86ddf8118123cb58a0fb8724cad6979c4069065b
- https://git.kernel.org/stable/c/ad673e514b2793b8d5902f6ba6ab7e890dea23d5
- https://git.kernel.org/stable/c/ea62dd1383913b5999f3d16ae99d411f41b528d4
- https://git.kernel.org/stable/c/f0bb3935470684306e4e04793a20ac4c4b08de0b