CVE-2026-46268: PCI/P2PDMA: Fix p2pmem_alloc_mmap() warning condition
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
PCI/P2PDMA: Fix p2pmem_alloc_mmap() warning condition
Commit b7e282378773 has already changed the initial page refcount of p2pdma page from one to zero, however, in p2pmem_alloc_mmap() it uses "VM_WARN_ON_ONCE_PAGE(!page_ref_count(page))" to assert the initial page refcount should not be zero and the following will be reported when CONFIG_DEBUG_VM is enabled:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x380400000 flags: 0x20000000002000(reserved|node=0|zone=4) raw: 0020000000002000 ff1100015e3ab440 0000000000000000 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: VM_WARN_ON_ONCE_PAGE(!page_ref_count(page)) ------------[ cut here ]------------ WARNING: CPU: 5 PID: 449 at drivers/pci/p2pdma.c:240 p2pmem_alloc_mmap+0x83a/0xa60
Fix by using "page_ref_count(page)" as the assertion condition.
The Linux kernel CVE team has assigned CVE-2026-46268 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.15 with commit b7e2823787735ca009e63f35f164b46df0ef096c and fixed in 6.18.14 with commit eb9aa9f8010465d927864f5a35bdc5604b0ff51a Issue introduced in 6.15 with commit b7e2823787735ca009e63f35f164b46df0ef096c and fixed in 6.19.4 with commit 9b69243983fb2f4d4d1f4ef0989bc1296547dc2c Issue introduced in 6.15 with commit b7e2823787735ca009e63f35f164b46df0ef096c and fixed in 7.0 with commit cb500023a75246f60b79af9f7321d6e75330c5b5
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-46268
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/pci/p2pdma.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/eb9aa9f8010465d927864f5a35bdc5604b0ff51a https://git.kernel.org/stable/c/9b69243983fb2f4d4d1f4ef0989bc1296547dc2c https://git.kernel.org/stable/c/cb500023a75246f60b79af9f7321d6e75330c5b5