A vulnerability in the Linux kernel's memory management subsystem involving the handling of huge Page Middle Directories (PMDs) during page table walks has been resolved. The issue occurs when a large folio mapped by Page Table Entries (PTEs) straddles PMD boundaries after an unaligned memory remap (mremap). The page_vma_mapped_walk() function prematurely stops walking page tables upon encountering a nonmatching huge PMD, potentially leaving migration entries behind. This can cause memory corruption due to stale migration PTEs that outlive their source folio.