In the Linux kernel, the following vulnerability has been resolved: arm64/mm: fix incorrect filemapcount for invalid pmd The page table check trigger BUGON() unexpectedly when split hugepage: ------------[ cut here ]------------ kernel BUG at mm/pagetablecheck.c:119! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 7 PID: 210 Comm: transhuge-stres Not tainted 6.1.0-rc3+ #748 Hardware name: linux,dummy-virt (DT) pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : pagetablecheckset.isra.0+0x398/0x468 lr : pagetablecheckset.isra.0+0x1c0/0x468 [...] Call trace: pagetablecheckset.isra.0+0x398/0x468 _pagetablecheckpteset+0x160/0x1c0 _splithugepmdlocked+0x900/0x1648 _splithugepmd+0x28c/0x3b8 unmappagerange+0x428/0x858 unmapsinglevma+0xf4/0x1c8 zappagerange+0x2b0/0x410 madvisevmabehavior+0xc44/0xe78 domadvise+0x280/0x698 _arm64sysmadvise+0x90/0xe8 invokesyscall.constprop.0+0xdc/0x1d8 doel0svc+0xf4/0x3f8 el0svc+0x58/0x120 el0t64synchandler+0xb8/0xc0 el0t64sync+0x19c/0x1a0 [...] On arm64, pmdleaf() will return true even if the pmd is invalid due to pmdpresentinvalid() check. So in pmdpinvalidate() the filemapcount will not only decrease once but also increase once. Then in setpteat(), the filemapcount increase again, and so trigger BUGON() unexpectedly. Add !pmdpresentinvalid() check in pmduseraccessible_page() to fix the problem.