CVE-2026-74518: mm/hugetlb: fix list corruption in allocate_file_region_entries()
In the Linux kernel, the following vulnerability has been resolved:
mm/hugetlb: fix list corruption in allocatefileregionentries()
allocatefileregionentries() tops up resv->regioncache with freshly allocated fileregion descriptors. The allocation uses GFPKERNEL, so resv->lock is dropped around it: the new entries are gathered on a stack-local list head, allocatedregions, and spliced into resv->regioncache once the lock is re-acquired.
The splice used listsplice(), which moves the entries but does not re-initialize the source head, so allocatedregions is left pointing at an entry that now lives on resv->regioncache. The top-up runs in a while loop that re-checks the cache deficit after re-acquiring the lock. For a shared mapping the resvmap is shared by every mapper of the hugetlbfs inode, so a concurrent regionchg()/regionadd()/regiondel() on the same resvmap can consume cache entries during the unlocked window and force a second iteration. That iteration calls listadd() on the stale head and corrupts the list; with CONFIGDEBUGLIST the listaddvalid() check trips:
listadd corruption. next->prev should be prev (ffffc900011ff7f8), but was ffff88814c281460. (next=ffff88814c545640). kernel BUG at lib/listdebug.c:31! allocatefileregionentries+0x191/0x420 regionchg+0x267/0x300 hugetlbreservepages+0x387/0xc80 hugetlbfsfilemmap+0x2ce/0x3f0 mmapregion+0x1348/0x1a80 dommap+0x85e/0xb90 vmmmappgoff+0x18c/0x330 ksysmmappgoff+0x2a1/0x3e0 dosyscall64+0xd7/0x420
Without CONFIGDEBUGLIST the bad listadd() silently links a kernel-stack address into resv->regioncache, leading to later use-after-free.
This was observed as a real host panic on a dense KVM host where a QEMU guest-RAM hugetlbfs file was mapped MAPSHARED by both QEMU and a separate SPDK/DPDK vhost-user target, generating concurrent region traffic on one shared resvmap.
Use listspliceinit() so the source head is re-initialized empty after each splice, making the retry loop safe.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-74518?
The severity of CVE-2026-74518 is rated at 56.
What type of vulnerability is CVE-2026-74518?
CVE-2026-74518 is classified as a Use After Free vulnerability.
How does CVE-2026-74518 affect the Linux kernel?
CVE-2026-74518 can lead to list corruption in the Linux kernel during the allocation of file region entries.
What is the impacted function in CVE-2026-74518?
The impacted function in CVE-2026-74518 is allocate_file_region_entries().
When was CVE-2026-74518 published?
CVE-2026-74518 was published on August 15, 2026.