CVE-2025-40263:修复 Linux 内核 cros_ec_keyb 驱动中的无效内存访问漏洞

本文详细描述了 Linux 内核中 cros_ec_keyb 输入设备驱动的一个安全漏洞。该漏洞在特定条件下(`buttons_switches_only`)会导致内核尝试访问未初始化的空指针内存区域,引发系统不稳定或崩溃,并提供了修复方案和参考链接。

CVE-2025-40263 - Input: cros_ec_keyb - 修复无效内存访问

概述

漏洞时间线

描述

在 Linux 内核中,已修复以下漏洞:

输入:cros_ec_keyb - 修复无效内存访问

如果在 cros_ec_keyb_probe() 中由于 buttons_switches_only 而未调用 cros_ec_keyb_register_matrix(),则 ckdev->idev 保持为 NULL。在这种情况下,当在 cros_ec_keyb_work() 中接收到 EC_MKBP_EVENT_KEY_MATRIX 事件时,会在 cros_ec_keyb_process() 中观察到无效的内存访问。

1
2
3
4
5
6
7
8
9
  Unable to handle kernel read from unreadable memory at virtual address 0000000000000028
  ...
  x3 : 0000000000000000 x2 : 0000000000000000
  x1 : 0000000000000000 x0 : 0000000000000000
  Call trace:
  input_event
  cros_ec_keyb_work
  blocking_notifier_call_chain
  ec_irq_thread

目前尚不清楚内核为何会接收到这种格式错误的事件,但无论如何,如果驱动程序不打算初始化 ckdev->idev 及其相关结构,内核就不应该访问它们。

信息

发布日期: 2025年12月4日 下午4:16 最后修改日期: 2025年12月4日 下午5:15 可远程利用:来源: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

受影响产品

以下产品受 CVE-2025-40263 漏洞影响。 即使 cvefeed.io 知晓受影响产品的确切版本,下表也未显示该信息。

尚无受影响产品记录

受影响供应商总数: 0 | 产品: 0

解决方案

应用内核更新以防止因空指针导致的无效内存访问。

  • 将 Linux 内核更新到最新版本。
  • 应用为 cros_ec_keyb 提供的补丁。
  • 确保设备结构得到正确初始化。
  • 在处理前验证输入事件。

公告、解决方案和工具参考

此处,您将找到与 CVE-2025-40263 相关的、提供深入信息、实用解决方案和有价值工具的外部链接精选列表。

CWE - 常见弱点枚举

虽然 CVE 标识特定的漏洞实例,但 CWE 对可能导致漏洞的常见缺陷或弱点进行分类。CVE-2025-40263 与以下 CWE 相关:

常见攻击模式枚举和分类 (CAPEC)

常见攻击模式枚举和分类 (CAPEC) 存储攻击模式,这些模式描述了对手利用 CVE-2025-40263 弱点所采用的常见属性和方法。

漏洞历史记录

以下表格列出了 CVE-2025-40263 漏洞随时间发生的变化。 漏洞历史记录详细信息有助于理解漏洞的演变,并识别可能影响漏洞严重性、可利用性或其他特征的最新变化。

日期 事件
Dec. 04, 2025 收到来自 416baaa9-dc9f-4396-8d5f-8c081fb06d67 的新 CVE
操作 类型 旧值 新值
已添加 描述 In the Linux kernel, the following vulnerability has been resolved:

Input: cros_ec_keyb - fix an invalid memory access

If cros_ec_keyb_register_matrix() isn’t called (due to
buttons_switches_only) in cros_ec_keyb_probe(), ckdev->idev remains
NULL. An invalid memory access is observed in cros_ec_keyb_process()
when receiving an EC_MKBP_EVENT_KEY_MATRIX event in cros_ec_keyb_work()
in such case.

Unable to handle kernel read from unreadable memory at virtual address 0000000000000028

x3 : 0000000000000000 x2 : 0000000000000000
x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
input_event
cros_ec_keyb_work
blocking_notifier_call_chain
ec_irq_thread

It’s still unknown about why the kernel receives such malformed event,
in any cases, the kernel shouldn’t access ckdev->idev and friends if
the driver doesn’t intend to initialize them.
已添加 参考 https://git.kernel.org/stable/c/2d251c15c27e2dd16d6318425d2f7260cbd47d39
已添加 参考 https://git.kernel.org/stable/c/6d81068685154535af06163eb585d6d9663ec7ec
已添加 参考 https://git.kernel.org/stable/c/7bfd959187f2c7584bb43280bbc7b2846e7a5085
已添加 参考 https://git.kernel.org/stable/c/9cf59f4724a9ee06ebb06c76b8678ac322e850b7
已添加 参考 https://git.kernel.org/stable/c/e08969c4d65ac31297fcb4d31d4808c789152f68
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计