CVE-2026-99617: arm64: mm: validate /dev/mem mmap ranges without overflow
In the Linux kernel, the following vulnerability has been resolved:
arm64: mm: validate /dev/mem mmap ranges without overflow
An arm64 syzkaller reproducer creates a FUSE character device with major:minor 1:1, so opening it uses the /dev/mem file operations. It maps one page from offset 0xfffffffffffff000 at user address zero. The next openat() with a NULL pathname triggers a synchronous external abort (SEA, ESR 0x96000010) in strncpyfromuser() via dogetname(), panicking the kernel.
validmmapphysaddrrange() checks the exclusive end by adding the mapping size to the starting address. For this offset, the sum wraps to zero and passes the PHYSMASK test, allowing an out-of-range PFN to reach remappfnrange(). The inclusive-end overflow check in mmapmemprepare() does not catch it because the end is ULONGMAX.
Reject starting PFNs outside PHYSMASK and compare the inclusive length against the remaining physical range without overflowing. This also allows mappings that end exactly at PHYSMASK, which the old check incorrectly rejects.
[catalin.marinas@arm.com: changed the check to look more like accessok()]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5
Frequently Asked Questions
Which systems are exposed to this issue?
The issue affects the arm64 Linux kernel /dev/mem mmap validation path. Exploitation requires an attacker to cause a mapping through /dev/mem file operations using an out-of-range physical offset near the maximum address value.
What is the observable impact of a successful trigger?
The provided reproducer causes a synchronous external abort during a later openat() call with a NULL pathname, leading to a kernel panic. The underlying condition allows an out-of-range PFN to reach remap_pfn_range() because the range-end calculation wraps around.
Does the flawed validation affect all boundary mappings?
No. The previous validation also incorrectly rejected mappings that ended exactly at PHYS_MASK. The corrected logic rejects starting PFNs outside PHYS_MASK and validates the mapping length against the remaining physical range without arithmetic overflow.