漏洞信息
# virtio-pci:修复管理命令完成时返回的结果大小问题
## 漏洞概述
Linux内核中的`virtio-pci`组件存在漏洞,导致返回的结果大小比实际数据大小多出8个字节。这会导致状态传输中包含额外的8个字节数据,并且内核中分配的缓冲区可能小于返回的大小,从而导致超出分配大小读取的问题。
## 影响版本
尚未明确指出受影响的具体内核版本
## 漏洞细节
- `virtio_pci_admin_dev_parts_get()`函数返回的结果大小比实际数据大小多8个字节,因为`result_sg_size`字段填充的是从`virtqueue_get_buf()`返回的结果长度,其中包含了数据大小和额外的8个字节的状态。
- 该漏洞导致两个问题:
1. 转移到目标的的状态包含了末尾的8个字节的额外数据。
2. 内核中分配的缓冲区可能比返回的大小小,读取数据时会超出缓冲区大小。
## 漏洞修复
通过从`virtqueue_get_buf()`的结果中减去状态大小来修正这个问题。
## 漏洞影响
该修复已通过使用`virtio-net`、`virtio-net-transitional`和`virtio-blk`设备进行的实时迁移测试。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
virtio-pci: Fix result size returned for the admin command completion
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
virtio-pci: Fix result size returned for the admin command completion
The result size returned by virtio_pci_admin_dev_parts_get() is 8 bytes
larger than the actual result data size. This occurs because the
result_sg_size field of the command is filled with the result length
from virtqueue_get_buf(), which includes both the data size and an
additional 8 bytes of status.
This oversized result size causes two issues:
1. The state transferred to the destination includes 8 bytes of extra
data at the end.
2. The allocated buffer in the kernel may be smaller than the returned
size, leading to failures when reading beyond the allocated size.
The commit fixes this by subtracting the status size from the result of
virtqueue_get_buf().
This fix has been tested through live migrations with virtio-net,
virtio-net-transitional, and virtio-blk devices.
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于virtio-pci中管理命令完成结果大小错误,可能导致状态传输错误。
CVSS信息
N/A
漏洞类别
其他