CVE-2024-42231: Linux Kernel - Undefined
- Cve: CVE-2024-42231
- Name: Linux Kernel - Undefined
- 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.
- Impact: Incorrect free space calculation may lead to over-commitment, reduced reclaim efficiency, and potential ENOSPC errors, risking system stability and data integrity.
- Remediation: Update to the latest Linux kernel version where the fix is included.
- Vulnerability impact: data_tampering, denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.5
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Epss score: 0.00183
- Epss percentile: 0.07762
- Assignee: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
- Published at: 2024-07-30T08:15:08Z
- Age in days: 847
- Modified at: 2026-06-17T07:49:04Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-42231
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: vulnerability type, requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-682 | Incorrect Calculation |
References
| Url | Source | Tags |
|---|---|---|
| https://git.kernel.org/stable/c/64d2c847ba380e07b9072d65a50aa6469d2aa43f | nvd | Patch |
| https://git.kernel.org/stable/c/8548903b1999bba02a2b894ad750ab8eb1f40307 | nvd | Patch |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| linux:linux_kernel | = 6.10 rc1; = 6.10 rc2; = 6.10 rc3; = 6.10 rc4; = 6.10 rc5; = 6.10 rc6; >= 6.7, < 6.9.9 | no | nvd | /v1/products/linux/linux_kernel |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| torvalds/linux | cna_commit, commit | yes | /v1/repositories/torvalds/linux |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Authentication required: yes
- Exposed hosts: 10038339
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports