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

CVE-2026-43330 Linux内核CAAM密钥处理溢出漏洞

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

漏洞信息

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

相关标签

Linux KernelBuffer OverflowCAAMCryptographyPrivilege Escalation

漏洞概述

Linux内核CAAM驱动在处理长HMAC密钥时存在漏洞。由于DMA缓存对齐需求,使用kmemdup复制密钥时发生越界读取,可能导致内存损坏或系统崩溃。

技术细节

该漏洞位于Linux内核的crypto/caam模块中。当HMAC密钥长度超过块大小时,驱动需将其复制并哈希。为了满足DMA缓存对齐要求,分配的内存大小需向上取整。原代码使用kmemdup(key, aligned_len, GFP_KERNEL)直接复制,导致从keylen大小的源缓冲区中读取aligned_len字节数据,造成越界读取。读取的垃圾数据可能随后的哈希计算导致邻近内存破坏,进而影响机密性、完整性和可用性。

攻击链分析

STEP 1
本地访问
攻击者需获得本地低权限访问权限(PR:L)。
STEP 2
触发漏洞
攻击者调用CAAM加密接口,并特意构造一个长度大于块大小的HMAC密钥。
STEP 3
内存越界
内核执行kmemdup时,从密钥缓冲区末尾读取额外数据,引发越界读取。
STEP 4
内存破坏
错误读取的数据可能导致后续哈希计算逻辑错误,破坏邻近内存,导致系统崩溃或权限提升。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
// Vulnerable Logic Simulation (Conceptual) // This is a kernel module snippet demonstrating the trigger condition. #include <linux/module.h> #include <linux/crypto.h> #include <linux/kernel.h> void vulnerable_hmac_key_copy(const u8 *key, unsigned int keylen) { unsigned int aligned_len = ALIGN(keylen, dma_get_cache_alignment()); // Vulnerability: kmemdup reads 'aligned_len' bytes from 'key' (size 'keylen') u8 *buf = kmemdup(key, aligned_len, GFP_KERNEL); if (!buf) return; // ... hash logic ... kfree(buf); } // Fix: Use kmalloc + explicit memcpy with keylen void fixed_hmac_key_copy(const u8 *key, unsigned int keylen) { unsigned int aligned_len = ALIGN(keylen, dma_get_cache_alignment()); u8 *buf = kmalloc(aligned_len, GFP_KERNEL); if (!buf) return; memcpy(buf, key, keylen); // Only copy keylen bytes // ... hash logic ... kfree(buf); }

影响范围

Linux Kernel (Specific versions prior to commits listed in references)

防御指南

临时缓解措施
限制非特权用户对加密接口的访问权限,启用内核地址空间布局随机化(KASLR)以增加利用难度。

参考链接