CVE-2024-26704

High

Description

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.

SeverityHigh
CVSS7.8
Exploit probability—
ProductLinux Kernel
PublishedApr 3, 2024
First seenApr 3, 2024

How to fix

Update
  • linux linux_kernel4.19.307, 5.4.269, 5.10.210, 5.15.149, 6.1.79, 6.6.18, 6.7.6 or later

Affected products

ProductAffected versionsFixed in
linux linux_kernel3.18 ≤ v < 4.19.307, 4.20 ≤ v < 5.4.269, 5.5 ≤ v < 5.10.210, 5.11 ≤ v < 5.15.149, 5.16 ≤ v < 6.1.79, 6.2 ≤ v < 6.6.18, 6.7 ≤ v < 6.7.6, 6.84.19.307, 5.4.269, 5.10.210, 5.15.149, 6.1.79, 6.6.18, 6.7.6
debian debian_linux10.0—

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.