• 公告ID (KylinSec-SA-2024-3442)

摘要:

In the Linux kernel, the following vulnerability has been resolved:btrfs: zoned: fix calc_available_free_space() for zoned modecalc_available_free_space() returns the total size of metadata (orsystem) block groups, which can be allocated from unallocated diskspace. The logic is wrong on zoned mode in two places.First, the calculation of data_chunk_size is wrong. We always allocateone zone as one chunk, and no partial allocation of a zone. So, weshould use zone_size (= data_sinfo->chunk_size) as it is.Second, the result avail may not be zone aligned. Since we alwaysallocate one zone as one chunk on zoned mode, returning non-zone sizealigned bytes will result in less pressure on the async metadata reclaimprocess.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 andend up in ENOSPC. We can align down to the zone size to avoid that.

安全等级: Low

公告ID: KylinSec-SA-2024-3442

发布日期: 2024年8月28日

关联CVE: CVE-2024-42231  

  • 详细介绍

1. 漏洞描述

   

In the Linux kernel, the following vulnerability has been resolved:btrfs: zoned: fix calc_available_free_space() for zoned modecalc_available_free_space() returns the total size of metadata (orsystem) block groups, which can be allocated from unallocated diskspace. The logic is wrong on zoned mode in two places.First, the calculation of data_chunk_size is wrong. We always allocateone zone as one chunk, and no partial allocation of a zone. So, weshould use zone_size (= data_sinfo->chunk_size) as it is.Second, the result avail may not be zone aligned. Since we alwaysallocate one zone as one chunk on zoned mode, returning non-zone sizealigned bytes will result in less pressure on the async metadata reclaimprocess.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 andend up in ENOSPC. We can align down to the zone size to avoid that.

2. 影响范围

cve名称 产品 组件 是否受影响
CVE-2024-42231 KY3.4-5 kernel Unaffected
CVE-2024-42231 KY3.5.3 kernel Unaffected
CVE-2024-42231 V6 kernel Unaffected

3. 影响组件

    无

4. 修复版本

    无

5. 修复方法

   无

6. 下载链接

    无
上一篇:KylinSec-SA-2024-3441 下一篇:KylinSec-SA-2024-3443