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

CVE-2026-43004: Linux内核stm32-ospi资源泄漏漏洞

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

漏洞信息

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

相关标签

资源泄漏拒绝服务Linux Kernel本地漏洞驱动程序漏洞

漏洞概述

Linux内核中的spi: stm32-ospi驱动程序在remove()回调中存在资源泄漏漏洞。当pm_runtime_resume_and_get()调用失败时,函数会提前返回,导致跳过了spi控制器及其他关键资源的清理步骤。这可能导致系统资源耗尽或驱动程序卸载后出现不稳定。

技术细节

该漏洞源于Linux内核驱动程序`drivers/spi/spi-stm32-ospi.c`的错误处理逻辑。在设备移除过程中,`stm32_ospi_remove()`函数首先调用`pm_runtime_resume_and_get()`以确保设备处于唤醒状态。如果该调用失败,原代码直接返回错误码,导致后续的`spi_controller_put()`和时钟禁用等清理代码未被执行。由于这是一个本地漏洞(AV:L),本地低权限攻击者可以通过反复触发设备绑定/解绑或利用硬件状态异常导致PM恢复失败,从而反复触发该漏洞。持续的资源泄漏最终会导致内核内存耗尽,引发系统拒绝服务(DoS)。

攻击链分析

STEP 1
步骤1
攻击者获得本地系统的低权限访问权限(PR:L)。
STEP 2
步骤2
攻击者识别系统加载了受影响的`stm32-ospi`驱动程序。
STEP 3
步骤3
攻击者通过sysfs等机制触发驱动程序的unbind/remove操作。
STEP 4
步骤4
在remove过程中,利用特定条件使`pm_runtime_resume_and_get()`调用失败。
STEP 5
步骤5
驱动程序因PM失败而提前返回,跳过内存和硬件资源的释放。
STEP 6
步骤6
资源发生泄漏,攻击者重复此过程导致系统资源耗尽(DoS)。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
/* * Conceptual PoC for CVE-2026-43004 * Demonstrating the vulnerable logic in the remove callback. */ #include <linux/module.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> // Hypothetical structure context struct spi_controller *ctrl; int vulnerable_remove(struct platform_device *pdev) { int ret; // Attempt to resume the device ret = pm_runtime_resume_and_get(&pdev->dev); if (ret < 0) { // BUG: Early return on PM failure skips resource cleanup // This leads to leaking 'ctrl' and keeping clocks enabled return ret; } // Normal cleanup path (skipped in the vulnerable case) spi_controller_put(ctrl); pm_runtime_disable(&pdev->dev); return 0; } // To trigger this, one would typically unbind the driver via sysfs // while the device is in a state where PM resume fails. // Command: echo 'stm32-ospi' > /sys/bus/platform/drivers/stm32-ospi/unbind

影响范围

Linux Kernel < 6.6 (Commit 0807532c5ebb)
Linux Kernel < 6.10 (Commit 73cd1f97946a)
Linux Kernel < 6.11 (Commit b4ec54c974c6)

防御指南

临时缓解措施
由于该漏洞需要本地访问权限,主要缓解措施是严格控制系统本地访问权限,并监控内核日志中的资源异常警告。如果无法立即升级内核,可以暂时禁用受影响的STM32 OSPI驱动模块以防止资源泄漏。

参考链接

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