漏洞标题
pds_core:处理不支持的PDS_CORE_CMD_FW_CONTROL结果
漏洞描述信息
## 概述
在Linux内核中,`pds_core`模块处理不支持的`PDS_CORE_CMD_FW_CONTROL`命令时存在一个漏洞。可能导致内核打印垃圾数据或崩溃。
## 细节
当固件不支持`PDS_CORE_CMD_FW_CONTROL`命令时,驱动程序可能打印垃圾数据或崩溃。这是因为`fw_list`栈变量未被初始化,导致`fw_list.num_fw_slots`为栈上的垃圾值。然后驱动程序尝试访问超出数组范围的`fw_list.fw_names[i]`。
## 影响
该漏洞可能导致`devlink dev info`命令运行时打印垃圾数据或崩溃。修复方法是初始化`fw_list`并确保即使`devcmd`失败也能打印其他有用信息。
CVSS信息
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:H
漏洞类别
对未经初始化资源的使用
漏洞标题
pds_core: handle unsupported PDS_CORE_CMD_FW_CONTROL result
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
pds_core: handle unsupported PDS_CORE_CMD_FW_CONTROL result
If the FW doesn't support the PDS_CORE_CMD_FW_CONTROL command
the driver might at the least print garbage and at the worst
crash when the user runs the "devlink dev info" devlink command.
This happens because the stack variable fw_list is not 0
initialized which results in fw_list.num_fw_slots being a
garbage value from the stack. Then the driver tries to access
fw_list.fw_names[i] with i >= ARRAY_SIZE and runs off the end
of the array.
Fix this by initializing the fw_list and by not failing
completely if the devcmd fails because other useful information
is printed via devlink dev info even if the devcmd fails.
CVSS信息
N/A
漏洞类别
N/A