Fix uninitialized PTE pages causing memory corruption

This commit is contained in:
2026-03-03 06:44:40 +01:00
parent a72bfd3902
commit ae8ac1eacb

View File

@@ -99,6 +99,9 @@ MM::Pfn::InitializePageDirectory(IN PMMPDE StartingPde,
/* Allocate a new PTE page and map PDE to it */ /* Allocate a new PTE page and map PDE to it */
MM::Paging::SetPte(ValidPte, AllocateBootstrapPages(1), 0); MM::Paging::SetPte(ValidPte, AllocateBootstrapPages(1), 0);
*StartingPde = *ValidPte; *StartingPde = *ValidPte;
/* Clear the newly created page */
RTL::Memory::ZeroMemory(MM::Paging::GetPteVirtualAddress(StartingPde), MM_PAGE_SIZE);
} }
/* Move to the next PDE */ /* Move to the next PDE */