CVE-2024-49880·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: ext4: fix off by one issue in alloc_flex_gd() Wesley reported an issue: ================================================================== EXT4-fs (dm-5): resizing filesystem from 7168 to 786432 blocks ------------[ cut here ]------------ kernel BUG at fs/ext4/resize.c:324! CPU: 9 UID: 0 PID: 3576 Comm: resize2fs Not tainted 6.11.0+ #27 RIP: 0010:ext4_resize_fs+0x1212/0x12d0 Call Trace: __ext4_ioctl+0x4e0/0x1800 ext4_ioctl+0x12/0x20 __x64_sys_ioctl+0x99/0xd0 x64_sys_call+0x1206/0x20d0 do_syscall_64+0x72/0x110 entry_SYSCALL_64_after_hwframe+0x76/0x7e ================================================================== While reviewing the patch, Honza found that when adjusting resize_bg in alloc_flex_gd(), it was possible for flex_gd->resize_bg to be bigger than flexbg_size. The reproduction of the problem requires the following: o_group = flexbg_size * 2 * n; o_size = (o_group + 1) * group_size; n_group: [o_group + flexbg_size, o_group + flexbg_size * 2) o_size = (n_group + 1) * group_size; Take n=0,flexbg_size=16 as an example: last:15 |o---------------|--------------n-| o_group:0 resize to n_group:30 The corresponding reproducer is: img=test.img rm -f $img truncate -s 600M $img mkfs.ext4 -F $img -b 1024 -G 16 8M dev=`losetup -f --show $img` mkdir -p /tmp/test mount $dev /tmp/test resize2fs $dev 248M Delete the problematic plus 1 to fix the issue, and add a WARN_ON_ONCE() to prevent the issue from happening again. [ Note: another reproucer which this commit fixes is: img=test.img rm -f $img truncate -s 25MiB $img mkfs.ext4 -b 4096 -E nodiscard,lazy_itable_init=0,lazy_journal_init=0 $img truncate -s 3GiB $img dev=`losetup -f --show $img` mkdir -p /tmp/test mount $dev /tmp/test resize2fs $dev 3G umount $dev losetup -d $dev -- TYT ]
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.11.3
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.25% — higher than 15% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2024-49880 scores 7.8 on CVSS, so a successful attack would be serious — but at 0.25%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 6.11
Until: 6.11.3
Fixed in: 6.11.3
How to fix this CVE
Update your Linux kernel to version 6.11.3 or later to resolve an off-by-one error in the ext4 filesystem resize logic that can trigger a kernel panic. This vulnerability affects systems performing ext4 filesystem resize operations, particularly with specific flex block group configurations. Apply the patch immediately if you manage ext4 filesystems and perform regular resize operations.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check kernel version: uname -r | grep -E '^6\.11\.[0-2]' — if output shows 6.11.0, 6.11.1, or 6.11.2, your system is vulnerable
- Verify ext4 is in use: df -T | grep ext4 — confirms if ext4 filesystems are mounted on the system
- Search kernel logs for resize panics: journalctl -b | grep -i 'ext4.*resize\|BUG at fs/ext4/resize' — indicates if the vulnerability was triggered
- Confirm patch applied: cat /proc/version — kernel version should be 6.11.3 or higher after remediation
FAQ
What is CVE-2024-49880?
This is an off-by-one arithmetic error in the Linux kernel's ext4 filesystem resize code (alloc_flex_gd function) that allows the resize_bg counter to exceed the flexbg_size limit, triggering a kernel BUG and system crash during filesystem expansion.
Is CVE-2024-49880 being actively exploited?
No, there is no evidence of active exploitation in the wild. This vulnerability requires local access and intentional filesystem resize operations to trigger.
What versions of Kernel are affected by CVE-2024-49880?
Linux kernel versions 6.11.0 through 6.11.2 are affected. Version 6.11.3 and later contain the fix.
How do I check if my server is vulnerable to CVE-2024-49880?
Run 'uname -r' and check if the output matches 6.11.[0-2]. Additionally, run 'df -T' to confirm ext4 filesystems are present on your system.
Does Defensia detect CVE-2024-49880?
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-49880 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-49880. Free for 1 server.
Get started free