IPBUF安全漏洞报告
English
CVE-2025-71087 CVSS 5.5 中危

CVE-2025-71087 Linux内核iavf驱动RSS配置Off-by-One漏洞

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

漏洞信息

漏洞编号
CVE-2025-71087
漏洞类型
缓冲区溢出/Off-by-One
CVSS评分
5.5 中危
攻击向量
本地 (AV:L)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
Linux Kernel iavf驱动

相关标签

Linux内核iavf驱动Off-by-One缓冲区溢出RSS配置本地提权内核漏洞CVE-2025-71087

漏洞概述

CVE-2025-71087是Linux内核中iavf驱动程序的一个中等严重性安全漏洞。该漏洞存在于iavf_config_rss_reg()函数中,由于RSS(Receive Side Scaling)哈希密钥和查找表配置时存在off-by-one错误,导致越界内存读取和设备寄存器越界写入。攻击者可通过本地低权限账户触发此漏洞,可能造成系统可用性下降或信息泄露。该漏洞的CVSS评分为5.5,属于中危级别,需要本地访问权限但无需用户交互即可利用。

技术细节

漏洞根源在于iavf_config_rss_reg()函数中配置RSS哈希密钥和查找表的循环边界错误。在修复前的代码中,循环条件使用`<=`运算符,条件为`i <= adapter->rss_{key,lut}_size / 4`。由于`rss_{key,lut}_size / 4`表示dword数量,实际有效索引范围是0到`(rss_{key,lut}_size / 4) - 1`,因此使用`<=`会导致访问数组末尾之后的越界位置。KASAN检测到的slab-out-of-bounds错误证实了这一点:读取操作发生在分配区域[ffff888102c50100, ffff888102c50134)之后0字节处,即访问了超出边界的内存。此漏洞可能使攻击者通过构造特定的RSS配置来触发越界读写,影响系统稳定性。修复方案是将循环条件从`<=`改为`<`,确保索引不超出数组边界。

攻击链分析

STEP 1
1
攻击者获得本地系统访问权限,拥有低权限账户
STEP 2
2
攻击者通过iavf驱动接口配置RSS参数,触发iavf_config_rss_reg()函数
STEP 3
3
函数中的循环使用<=条件访问数组,导致索引超出边界一个位置
STEP 4
4
KASAN检测到slab-out-of-bounds读取或写入,触发内核警告
STEP 5
5
漏洞导致系统可用性下降(高影响)或潜在的敏感信息泄露

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
// CVE-2025-71087 PoC - Trigger off-by-one in iavf_config_rss_reg // This demonstrates the boundary condition that causes the vulnerability #include <stdio.h> #include <stdint.h> // Simulate the vulnerable condition void demonstrate_offbyone_vulnerability(void) { uint32_t rss_key_size = 52; // Typical RSS key size uint32_t rss_lut_size = 128; // Typical LUT size uint32_t num_dwords_key = rss_key_size / 4; // = 13 uint32_t num_dwords_lut = rss_lut_size / 4; // = 32 printf("RSS Key: %d dwords, valid indices: 0 to %d\n", num_dwords_key, num_dwords_key - 1); printf("RSS LUT: %d dwords, valid indices: 0 to %d\n", num_dwords_lut, num_dwords_lut - 1); // Vulnerable code pattern (using <=) printf("\n[VULNERABLE] Loop with <= condition:\n"); for (uint32_t i = 0; i <= num_dwords_key / 4; i++) { printf(" Accessing index %u (last valid: %u)\n", i, num_dwords_key - 1); if (i > num_dwords_key - 1) { printf(" *** OUT-OF-BOUNDS ACCESS at index %u! ***\n", i); } } // Fixed code pattern (using <) printf("\n[FIXED] Loop with < condition:\n"); for (uint32_t i = 0; i < num_dwords_key / 4; i++) { printf(" Accessing index %u (safe)\n", i); } } int main() { printf("CVE-2025-71087 Off-by-One Vulnerability Demonstration\n"); printf("==================================================\n\n"); demonstrate_offbyone_vulnerability(); return 0; } /* * To trigger the actual vulnerability: * 1. Use a system with iavf driver loaded * 2. Configure RSS with specific key/LUT sizes * 3. The off-by-one occurs during iavf_watchdog_task execution * * KASAN will report: * BUG: KASAN: slab-out-of-bounds in iavf_config_rss+0x619/0x800 */

影响范围

Linux Kernel 6.18.0-rc2 (受影响的测试版本)
iavf驱动 - commit 43a3d9ba34c9之后引入漏洞的版本
i40evf/iavf驱动在RSS配置功能引入后的版本

防御指南

临时缓解措施
如果无法立即升级内核,可通过禁用iavf驱动的RSS功能来缓解风险。同时限制非特权用户对网络配置的控制权限,并监控系统日志中的KASAN错误信息。建议在生产环境中应用内核安全更新前先在测试环境验证。

参考链接

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