CVE-2024-42231
MediumIn 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 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-682CVE-2024-42231 is a Incorrect Calculation vulnerability
What is Incorrect Calculation?
The product performs a calculation that generates incorrect or unintended results. Learn more on MITRE CWE
References
The following references provide additional information about CVE-2024-42231 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/64d2c847ba380e07b9072d65a50aa6469d2aa43f
-
PatchKernel patch commithttps://git.kernel.org/stable/c/8548903b1999bba02a2b894ad750ab8eb1f40307
Frequently asked questions
-
What is CVE-2024-42231?
CVE-2024-42231 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as an Incorrect Calculation flaw (CWE-682) . CVE-2024-42231 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2024-42231?
CVE-2024-42231 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2024-42231?
No patch is currently available for CVE-2024-42231. Monitor the NIST NVD and your Linux distribution's security advisories for updates.
-
Is CVE-2024-42231 actively exploited?
No — CVE-2024-42231 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Incorrect Calculation (CWE-682)?
The product performs a calculation that generates incorrect or unintended results. View CWE-682 on MITRE CWE →