{"id":14977,"date":"2026-09-04T19:02:20","date_gmt":"2026-09-04T11:02:20","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-63950"},"modified":"2026-09-04T19:02:20","modified_gmt":"2026-09-04T11:02:20","slug":"cve-2026-63950","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-63950","title":{"rendered":"CVE-2026-63950 [HIGH] &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmm\/rmap: initialize n"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/rmap: initialize nr_pages to 1 at loop start in try_to_unmap_one<\/p>\n<p>Initialize nr_pages to 1 at the start of each loop iteration, like<br \/>\nfolio_referenced_one() does.<\/p>\n<p>Without this, nr_pages computed by a previous folio_unmap_pte_batch() call<br \/>\ncan be reused on a later iteration that does not run<br \/>\nfolio_unmap_pte_batch() again.<\/p>\n<p>mmap a 64K large folio with MAP_ANONYMOUS | MAP_DROPPABLE, then call<br \/>\nmadvise(MADV_FREE), then make the last page device-exclusive via<br \/>\nHMM_DMIRROR_EXCLUSIVE.<\/p>\n<p>Trigger node reclaim through sysfs.  Now, in try_to_unmap_one(), we will<br \/>\nfirst clear the first 15 out of 16 entries mapping the lazyfree folio.<br \/>\nThis will set nr_pages to 15.  In the next pvmw walk, this nr_pages gets<br \/>\nreused on a device-exclusive pte, thus potentially corrupting folio<br \/>\nrefcount\/mapcount.<\/p>\n<p>At the moment, I have a userspace program which can make the kernel spit<br \/>\nout a trace, but the blow up is in folio_referenced_one(), because there<br \/>\nare existing bugs in the interaction between device-private and rmap<br \/>\n(which too I am investigating).  I did a one liner kernel change to avoid<br \/>\ngoing into folio_referenced_one(), and the kernel blows up at<br \/>\nfolio_remove_rmap_ptes in try_to_unmap_one which is what I wanted.<\/p>\n<p>Note that the bug is there not since file folio batching but lazyfree<br \/>\nfolio batching, since device-exclusive only works for anonymous folios.<\/p>\n<p>Userspace visible effect is simply kernel crashing somewhere due to<br \/>\nrefcount\/mapcount corruption.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/rmap: initialize nr_pages to 1 at loop start in try_to_unmap_one<\/p>\n<p>Initialize nr_pages to 1 at the start of each loop iteration, <\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-14977","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/14977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}