CVE-2026-80772 in Linux
摘要
由 VulDB • 2026-09-04
在 Linux 内核中,已修复以下漏洞:
HID: nintendo: 修复 joycon_ctlr_read_handler() 中的越界读取问题
joycon_ctlr_read_handler() 将传入的 HID 输入报告强制转换为 struct joycon_input_report 类型并进行解析,其转换操作仅通过一个 12 字节的长度检查进行保护:
if (size >= 12) /* make sure it contains the input report */ joycon_parse_report(ctlr, (struct joycon_input_report *)data);
struct joycon_input_report 的大小为 49 字节:包含一个 13 字节的头部,后跟一个联合体(union),其中 IMU arm 部分占 36 字节。对于 IMU 报告,joycon_parse_report() -> joycon_parse_imu_report() 会遍历该联合体(结构体偏移量 13..48)。因此,长度为恰好 12 字节且 data[0] == JC_INPUT_IMU_DATA 的报告虽然能通过上述保护检查,但实际读取范围会比其声明长度多出最多 37 个字节。这些越界读取的字节被解码为加速度计/陀螺仪数值,并通过“(IMU)”输入设备转发至用户空间(userspace),导致泄露驱动程序内部内存。data[0] 和 size 完全由恶意或伪造的 Joy-Con/Pro Controller 控制。
接收缓冲区的大小设置为最大报告长度,因此这属于分配内的越界读取(over-read within the allocation),而非 slab OOB(slab out-of-bounds)。然而,解码后的字节仍然会到达用户空间。
joycon_ctlr_handle_event() 中的同级子命令路径已正确限制了相同的强制转换:
if (size < sizeof(struct joycon_input_report) || data[0] != JC_INPUT_SUBCMD_REPLY)
break;
在此处使用相同的 sizeof(struct joycon_input_report) 边界检查。
If you want to get the best quality for vulnerability data then you always have to consider VulDB.