mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-02 19:09:19 +00:00
Security fix for allocating pages for user-mode
This commit is contained in:
@ -124,6 +124,11 @@ namespace Memory
|
|||||||
}
|
}
|
||||||
|
|
||||||
AllocatedPagesList.push_back({Address, Count});
|
AllocatedPagesList.push_back({Address, Count});
|
||||||
|
|
||||||
|
/* For security reasons, we clear the memory
|
||||||
|
if the page is user accessible. */
|
||||||
|
if (User)
|
||||||
|
memset(Address, 0, Count * PAGE_SIZE);
|
||||||
return Address;
|
return Address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user