{"id":"CVE-2024-42231","published":"2024-07-30T07:47:11Z","modified":"2026-05-11T20:28:20Z","title":"btrfs: zoned: fix calc_available_free_space() for zoned mode","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: zoned: fix calc_available_free_space() for zoned mode\n\ncalc_available_free_space() returns the total size of metadata (or\nsystem) block groups, which can be allocated from unallocated disk\nspace. The logic is wrong on zoned mode in two places.\n\nFirst, the calculation of data_chunk_size is wrong. We always allocate\none zone as one chunk, and no partial allocation of a zone. So, we\nshould use zone_size (= data_sinfo->chunk_size) as it is.\n\nSecond, the result \"avail\" may not be zone aligned. Since we always\nallocate one zone as one chunk on zoned mode, returning non-zone size\naligned bytes will result in less pressure on the async metadata reclaim\nprocess.\n\nThis is serious for the nearly full state with a large zone size device.\nAllowing over-commit too much will result in less async reclaim work and\nend up in ENOSPC. We can align down to the zone size to avoid that.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00267,"percentile":0.11808,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/8548903b1999bba02a2b894ad750ab8eb1f40307","tags":[]},{"url":"https://git.kernel.org/stable/c/64d2c847ba380e07b9072d65a50aa6469d2aa43f","tags":[]}],"priority":{"score":2.4,"factors":[{"name":"EPSS percentile","points":2.36}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= cb6cbab79055ca207ad88bc54226b48ececdcef0, < 8548903b1999bba02a2b894ad750ab8eb1f40307",">= cb6cbab79055ca207ad88bc54226b48ececdcef0, < 64d2c847ba380e07b9072d65a50aa6469d2aa43f"]},{"vendor":"Linux","product":"Linux","versions":["6.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-10T16:14:20.817500Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-39880","exploited":false,"provenance":"source"}}