Executive brief
A vulnerability in the Linux kernel's storage partition management could allow a local user to crash the system. The issue occurs when the system attempts to process disk partitions and encounters an error, leading to an invalid memory access. This could result in a system-wide denial of service, impacting operational availability.
Technical details
A NULL pointer dereference (CWE-476) exists in the blk_add_partition() function within the Linux kernel's block layer. The vulnerability was introduced by a change in error handling logic that allowed the function to proceed to call md_autodetect_dev() even when the 'part' pointer was an error value (specifically -ENXIO). An attacker with local access could potentially trigger this path during partition manipulation, leading to a kernel oops or panic. The fix involves restructuring the conditional logic to ensure md_autodetect_dev() is only called when 'part' is a valid pointer. Patches have been released for various stable kernel branches including 5.10.227, 5.15.168, 6.1.113, 6.6.54, 6.10.13, and 6.11.2.
Affected products
- Linux Linux kernel 5.5 to 5.10.226, 5.11 to 5.15.167, 5.16 to 6.1.112, 6.2 to 6.6.53, 6.7 to 6.10.12, 6.11 to 6.11.1
Timeline
- 2024-10-21: disclosed
- 2024-10-21: advisory
References
- https://git.kernel.org/stable/c/26e197b7f9240a4ac301dd0ad520c0c697c2ea7d
- https://git.kernel.org/stable/c/4bc4272e2506941c3f3d4fb8b0c659ee814dcf6f
- https://git.kernel.org/stable/c/64cf2a39202ca2d9df5ee70eb310b6141ce2b8ed
- https://git.kernel.org/stable/c/652039ba477c9a4ab43740cf2cb0d068d53508c2
- https://git.kernel.org/stable/c/80f5bfbb80ea1615290dbc24f49d3d8c86db58fe
- https://git.kernel.org/stable/c/afe53ea9b378c376101d99d216f13b6256f75189
- https://git.kernel.org/stable/c/cc4d21d9492db4e534d3e01253cf885c90dd2a8b