IPBUF安全漏洞报告
English
CVE-2026-31656 CVSS 7.8 高危

CVE-2026-31656 Linux内核i915驱动竞态条件漏洞

披露日期: 2026-04-24
来源: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

漏洞信息

漏洞编号
CVE-2026-31656
漏洞类型
竞态条件
CVSS评分
7.8 高危
攻击向量
本地 (AV:L)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Linux Kernel

相关标签

Linux KernelRace ConditionPrivilege EscalationDoSi915Use-After-Free

漏洞概述

Linux内核中的Intel i915显卡驱动模块存在一个高危安全漏洞。该漏洞源于心跳工作线程与intel_engine_park_heartbeat()函数在处理引擎心跳请求时发生竞态条件。由于读取指针与清空指针的操作是非原子的,导致同一请求可能被两个执行路径同时释放,引发引用计数下溢或释放后使用。本地低权限攻击者可利用此漏洞导致系统崩溃,甚至可能通过内存破坏进一步实现权限提升,严重影响系统的机密性、完整性和可用性。

技术细节

该漏洞位于Linux内核的drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c文件中。当心跳工作线程检测到请求完成时,会调用i915_request_put()释放请求,并在随后的步骤中清空engine->heartbeat.systole指针。与此同时,在另一个CPU核心上,请求退役流程可能将引擎的唤醒引用计数降为零,触发__engine_park()进而调用intel_engine_park_heartbeat()。如果此时心跳定时器处于挂起状态,cancel_delayed_work()返回真,导致该函数读取到尚未被清空的旧指针,并再次调用i915_request_put()。这种双重释放导致引用计数下溢。修复方案使用xchg()原子指令替换原有的非原子操作,确保读取旧指针和写入NULL的步骤不可分割,从而避免竞态。

攻击链分析

STEP 1
步骤1:获取访问权限
攻击者获取本地系统的低权限用户访问权限。
STEP 2
步骤2:触发竞态条件
攻击者运行恶意程序,通过Intel i915驱动发起大量的GPU工作负载请求,以此频繁触发引擎的挂起和唤醒操作。
STEP 3
步骤3:利用漏洞
程序精心安排时序,使心跳工作线程和intel_engine_park_heartbeat()函数几乎同时尝试释放同一个心跳请求对象。
STEP 4
步骤4:造成影响
触发引用计数下溢,导致内核崩溃(DoS)或内存破坏,利用该内存破坏可能进一步实现内核级别的权限提升。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
/* * Conceptual PoC for CVE-2026-31656 (Race Condition) * This code attempts to trigger the race by spamming GPU operations. * Requires root/sudo to interact with kernel modules directly in some setups, * but the vulnerability is triggered by local unprivileged users. */ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #define DEVICE_PATH "/dev/dri/card0" // Typical path for i915 void* workload_thread(void* arg) { // Simulate heavy workload to trigger engine park/unpark cycles // In a real exploit, this involves specific DRM_IOCTL calls for (int i = 0; i < 10000; i++) { // Placeholder for actual ioctl calls to i915 // ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, ...); usleep(1); } return NULL; } int main() { pthread_t t1, t2; int fd = open(DEVICE_PATH, O_RDWR); if (fd < 0) { perror("Failed to open device"); return 1; } printf("[+] Starting race condition trigger for CVE-2026-31656\n"); // Create multiple threads to increase likelihood of race pthread_create(&t1, NULL, workload_thread, NULL); pthread_create(&t2, NULL, workload_thread, NULL); pthread_join(t1, NULL); pthread_join(t2, NULL); close(fd); printf("[+] Exploit attempt finished. Check dmesg for refcount errors.\n"); return 0; }

影响范围

Linux Kernel < 6.8
Linux Kernel stable branches before commit 2af8b200cae3fdd0e917ecc2753b28bb40c876c1

防御指南

临时缓解措施
建议立即升级Linux内核。若无法立即升级,可限制非管理员用户对图形设备的访问权限,或禁用受影响的图形驱动模块以降低风险,但这会影响图形显示功能。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表