First published: Wed Apr 03 2024(Updated: )
In the Linux kernel, the following vulnerability has been resolved: ext4: fix double-free of blocks due to wrong extents moved_len In ext4_move_extents(), moved_len is only updated when all moves are successfully executed, and only discards orig_inode and donor_inode preallocations when moved_len is not zero. When the loop fails to exit after successfully moving some extents, moved_len is not updated and remains at 0, so it does not discard the preallocations. If the moved extents overlap with the preallocated extents, the overlapped extents are freed twice in ext4_mb_release_inode_pa() and ext4_process_freed_data() (as described in commit 94d7c16cbbbd ("ext4: Fix double-free of blocks with EXT4_IOC_MOVE_EXT")), and bb_free is incremented twice. Hence when trim is executed, a zero-division bug is triggered in mb_update_avg_fragment_size() because bb_free is not zero and bb_fragments is zero. Therefore, update move_len after each extent move to avoid the issue.
Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Software | Affected Version | How to fix |
---|---|---|
redhat/kernel | <4.19.307 | 4.19.307 |
redhat/kernel | <5.4.269 | 5.4.269 |
redhat/kernel | <5.10.210 | 5.10.210 |
redhat/kernel | <5.15.149 | 5.15.149 |
redhat/kernel | <6.1.79 | 6.1.79 |
redhat/kernel | <6.6.18 | 6.6.18 |
redhat/kernel | <6.7.6 | 6.7.6 |
redhat/kernel | <6.8 | 6.8 |
Linux kernel | >=3.18<4.19.307 | |
Linux kernel | >=4.20<5.4.269 | |
Linux kernel | >=5.5<5.10.210 | |
Linux kernel | >=5.11<5.15.149 | |
Linux kernel | >=5.16<6.1.79 | |
Linux kernel | >=6.2<6.6.18 | |
Linux kernel | >=6.7<6.7.6 | |
Linux kernel | =6.8-rc1 | |
Linux kernel | =6.8-rc2 | |
Debian | =10.0 | |
debian/linux | 5.10.223-1 5.10.234-1 6.1.123-1 6.1.128-1 6.12.12-1 6.12.16-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2024-26704 is considered a moderate severity vulnerability due to its potential impact on system stability.
To mitigate CVE-2024-26704, update your Linux kernel to one of the patched versions listed, such as 4.19.307 or 5.4.269.
CVE-2024-26704 affects multiple Linux kernel versions, specifically those prior to 4.19.307, 5.4.269, 5.10.210, 5.15.149, 6.1.79, and others.
CVE-2024-26704 involves a double-free of blocks in the ext4 file system due to incorrect management of moved_len in ext4_move_extents function.
Yes, if your system is running an affected version of the Linux kernel that has not been updated, it is vulnerable to CVE-2024-26704.