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

摘要:

In the Linux kernel, the following vulnerability has been resolved:

virtio: packed: fix unmap leak for indirect desc table

When use_dma_api and premapped are true, then the do_unmap is false.

Because the do_unmap is false, vring_unmap_extra_packed is not called by
detach_buf_packed.

if (unlikely(vq->do_unmap)) {
curr = id;
for (i = 0; i < state-&gt;num; i++) {
vring_unmap_extra_packed(vq,
&amp;vq-&gt;packed.desc_extra[curr]);
curr = vq-&gt;packed.desc_extra[curr].next;
}
}

So the indirect desc table is not unmapped. This causes the unmap leak.

So here, we check vq-&gt;use_dma_api instead. Synchronously, dma info is
updated based on use_dma_api judgment

This bug does not occur, because no driver use the premapped with
indirect.

安全等级: Low

公告ID: KylinSec-SA-2024-2128

发布日期: 2024年5月28日

关联CVE: CVE-2024-27066  

  • 详细介绍

1. 漏洞描述

   

In the Linux kernel, the following vulnerability has been resolved:

virtio: packed: fix unmap leak for indirect desc table

When use_dma_api and premapped are true, then the do_unmap is false.

Because the do_unmap is false, vring_unmap_extra_packed is not called by
detach_buf_packed.

if (unlikely(vq-&gt;do_unmap)) {
curr = id;
for (i = 0; i < state-&gt;num; i++) {
vring_unmap_extra_packed(vq,
&amp;vq-&gt;packed.desc_extra[curr]);
curr = vq-&gt;packed.desc_extra[curr].next;
}
}

So the indirect desc table is not unmapped. This causes the unmap leak.

So here, we check vq-&gt;use_dma_api instead. Synchronously, dma info is
updated based on use_dma_api judgment

This bug does not occur, because no driver use the premapped with
indirect.

2. 影响范围

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

3. 影响组件

    无

4. 修复版本

    无

5. 修复方法

   无

6. 下载链接

    无
上一篇:KylinSec-SA-2024-2127 下一篇:KylinSec-SA-2024-2129