CVE-2024-42231

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
30/07/2024
Last modified:
30/07/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> btrfs: zoned: fix calc_available_free_space() for zoned mode<br /> <br /> calc_available_free_space() returns the total size of metadata (or<br /> system) block groups, which can be allocated from unallocated disk<br /> space. The logic is wrong on zoned mode in two places.<br /> <br /> First, the calculation of data_chunk_size is wrong. We always allocate<br /> one zone as one chunk, and no partial allocation of a zone. So, we<br /> should use zone_size (= data_sinfo-&gt;chunk_size) as it is.<br /> <br /> Second, the result "avail" may not be zone aligned. Since we always<br /> allocate one zone as one chunk on zoned mode, returning non-zone size<br /> aligned bytes will result in less pressure on the async metadata reclaim<br /> process.<br /> <br /> This is serious for the nearly full state with a large zone size device.<br /> Allowing over-commit too much will result in less async reclaim work and<br /> end up in ENOSPC. We can align down to the zone size to avoid that.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.9.9 (excluding)
cpe:2.3:o:linux:linux_kernel:6.10:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.10:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.10:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.10:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.10:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.10:rc6:*:*:*:*:*:*