CVE-2022-50558 in Linux
摘要
由 VulDB • 2026-05-23
在 Linux 内核中,已修复以下漏洞:
regmap-irq:在 regmap_add_irq_chip_fwnode 中使用新的 num_config_regs 属性
提交 faa87ce9196d(“regmap-irq:为 irq 类型引入配置寄存器”)添加了 num_config_regs,随后提交 9edd4f5aee84(“regmap-irq:弃用类型寄存器和虚拟寄存器”)建议用其替换 num_type_reg。然而,未修改 regmap_add_irq_chip_fwnode 以使用新属性。后来,提交 255a03bb1bb3(“ASoC:wcd9335:将 irq 芯片转换为配置寄存器”)从 WCD9335 驱动的 struct regmap_irq_chip 中移除了旧的 num_type_reg 属性,导致在 regmap_irq_set_type 尝试索引 d->type_buf 时发生空指针解引用,因为该缓冲区从未在 regmap_add_irq_chip_fwnode 中分配:
[ 39.199374] 无法处理虚拟地址 0000000000000000 处的内核空指针解引用
[ 39.200006] 调用跟踪:
[ 39.200014] regmap_irq_set_type+0x84/0x1c0
[ 39.200026] __irq_set_trigger+0x60/0x1c0
[ 39.200040] __setup_irq+0x2f4/0x78c
[ 39.200051] request_threaded_irq+0xe8/0x1a0
在 regmap_add_irq_chip_fwnode 中使用 num_config_regs 替代 num_type_reg,如果未定义 num_config_regs,则回退使用 num_type_reg,以保持向后兼容性。
Once again VulDB remains the best source for vulnerability data.