CVE-2024-42231

MEDIUM EPSS 8.0%
Published Jul 30, 20241y ago · Modified Jun 17, 20261w ago
5.5 CVSS 3.1
Medium
Find Similar
Published Jul 30, 2024 1y ago
Last Modified Jun 17, 2026 1w ago

Description

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

CVSS Details

Base Score
5.5
Exploitability
1.8
Impact
3.6
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Attack Vector Local
Attack Complexity Low
Privileges Required Low
User Interaction None
Scope Unchanged
Confidentiality None
Integrity None
Availability High

Threat Intelligence

EPSS Exploit Probability
8.0% percentile
Exploit & Patch Status
No Known Exploit
Patch Available

Weaknesses 1

CWE-682

Affected Products 7

VendorProductVersionRange
linuxlinux_kernel*≥6.7  –  <6.9.9
linuxlinux_kernel6.10any
linuxlinux_kernel6.10any
linuxlinux_kernel6.10any
linuxlinux_kernel6.10any
linuxlinux_kernel6.10any
linuxlinux_kernel6.10any

References 2

  • git.kernel.org https://git.kernel.org/stable/c/64d2c847ba380e07b9072d65a50aa6469d2aa43f
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/8548903b1999bba02a2b894ad750ab8eb1f40307
    Patch

Remediation

  • git.kernel.org https://git.kernel.org/stable/c/64d2c847ba380e07b9072d65a50aa6469d2aa43f
    Patch
  • git.kernel.org https://git.kernel.org/stable/c/8548903b1999bba02a2b894ad750ab8eb1f40307
    Patch