Re: [PATCH] mm/hugetlb: stop hashing address_space pointers for fault mutexes
From: Zhengchuan Liang
Date: Wed Nov 25 2026 - 13:59:34 EST
> I'm not sure we care about this problem. I'll let other speak up.
>
> Attacking hugetlb users is stupid. This doesn't matter in practice.
Thanks. To clarify the threat model, this is an exact kernel heap
address leak. The attack does not target another HugeTLB user or their
mapping. An unprivileged process creates and operates only on its own
no-reserve HugeTLB memfd, even with an empty huge-page pool, and recovers
the exact address of its embedded address_space. Since that object has a
fixed offset within struct hugetlbfs_inode_info, this also gives the
exact address of the hugetlbfs_inode_cache allocation.
KernelSnitch (NDSS 2025) demonstrated why the address of an
attacker-created object can be useful. It recovered an mm_struct address,
freed all objects in the corresponding slab, reclaimed the slab pages
with msg_msg objects, and thereby learned the addresses of those
replacement objects. Here an attacker can similarly allocate and release
hugetlbfs_inode_cache objects by creating and closing HugeTLB memfds. I
have not demonstrated full-slab reclamation or cross-cache reuse for this
case.
https://www.ndss-symposium.org/ndss-paper/kernelsnitch-side-channel-attacks-on-kernel-data-structures/
> Can't we still end up with the same problem, just slightly different,
> afterwards?
Yes, the timing channel may allow the per-inode seed to be recovered as
well. That does not recreate the address disclosure: the seed is neither
derived from a kernel address nor used anywhere else, so recovering it
reveals only this inode's bucket distribution.
A simpler fix would be to replace the mapping pointer in the existing key
with mapping->host->i_ino. The inode number is stable for the inode's
lifetime and is already exposed through fstat(). This would preserve
separate per-inode distributions without adding a new field.
I understand if this particular address disclosure is not considered
worth fixing.
Best,
Zhengchuan