CVE-2024-38598·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: md: fix resync softlockup when bitmap size is less than array size Is is reported that for dm-raid10, lvextend + lvchange --syncaction will trigger following softlockup: kernel:watchdog: BUG: soft lockup - CPU#3 stuck for 26s! [mdX_resync:6976] CPU: 7 PID: 3588 Comm: mdX_resync Kdump: loaded Not tainted 6.9.0-rc4-next-20240419 #1 RIP: 0010:_raw_spin_unlock_irq+0x13/0x30 Call Trace: <TASK> md_bitmap_start_sync+0x6b/0xf0 raid10_sync_request+0x25c/0x1b40 [raid10] md_do_sync+0x64b/0x1020 md_thread+0xa7/0x170 kthread+0xcf/0x100 ret_from_fork+0x30/0x50 ret_from_fork_asm+0x1a/0x30 And the detailed process is as follows: md_do_sync j = mddev->resync_min while (j < max_sectors) sectors = raid10_sync_request(mddev, j, &skipped) if (!md_bitmap_start_sync(..., &sync_blocks)) // md_bitmap_start_sync set sync_blocks to 0 return sync_blocks + sectors_skippe; // sectors = 0; j += sectors; // j never change Root cause is that commit 301867b1c168 ("md/raid10: check slab-out-of-bounds in md_bitmap_get_counter") return early from md_bitmap_get_counter(), without setting returned blocks. Fix this problem by always set returned blocks from md_bitmap_get_counter"(), as it used to be. Noted that this patch just fix the softlockup problem in kernel, the case that bitmap size doesn't match array size still need to be fixed.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.9.3
- Published
- 2024-06-19
Affected versions
From: 6.9
Until: 6.9.3
Fixed in: 6.9.3
How to fix this CVE
Update your Linux kernel to version 6.9.3 or later to resolve a resync softlockup issue affecting dm-raid10 configurations. This vulnerability causes the md_resync thread to hang indefinitely when bitmap size is smaller than array size, potentially requiring system restart. Apply the kernel update immediately and reboot your system to restore normal RAID resync operations.
sudo dnf check-update kernel && sudo dnf update kernel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with `uname -r` and compare against vulnerable range 6.9.0-6.9.2
- Step 2: Verify if dm-raid10 is active by running `cat /proc/mdstat` and checking for raid10 arrays
- Step 3: Search system logs for softlockup warnings with `sudo dmesg | grep -i 'soft lockup'` or `sudo journalctl -b | grep -i 'soft lockup'`
- Step 4: Confirm fix by upgrading kernel and running `uname -r` to verify version is 6.9.3 or later, then verify mdstat shows healthy raid without resync hangs
FAQ
What is CVE-2024-38598?
This is a Linux kernel vulnerability where the md_bitmap_get_counter() function fails to properly set returned block counts during RAID10 resync operations, causing the resync thread to enter an infinite loop and triggering a CPU softlockup.
Is CVE-2024-38598 being actively exploited?
No, this vulnerability is not being actively exploited in the wild. It requires specific conditions: running kernel 6.9.0-6.9.2, using dm-raid10, and triggering a resync operation via lvextend/lvchange.
What versions of Kernel are affected by CVE-2024-38598?
Kernel versions 6.9.0 through 6.9.2 are affected. Version 6.9.3 and later include the fix.
How do I check if my server is vulnerable to CVE-2024-38598?
Run `uname -r` and check if the kernel version is between 6.9.0 and 6.9.2, then verify dm-raid10 is in use with `cat /proc/mdstat | grep raid10`. If both conditions are true, your system is vulnerable.
Does Defensia detect CVE-2024-38598?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-38598 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/3f5b73ef8fd6268cbc968b308d8eafe56fda97f3
- https://git.kernel.org/stable/c/43771597feba89a839c5f893716df88ae5c237ce
- https://git.kernel.org/stable/c/5817f43ae1a118855676f57ef7ab50e37eac7482
- https://git.kernel.org/stable/c/69296914bfd508c85935bf5f711cad9b0fe78492
- https://git.kernel.org/stable/c/71e8e4f288e74a896b6d9cd194f3bab12bd7a10f
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-38598. Free for 1 server.
Get started free