mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17:35 +00:00
Kernel: Add a random offset to the base of the per-process VM allocator
This is not ASLR, but it does de-trivialize exploiting the ELF loader which would previously always parse executables at 0x01001000 in every single exec(). I've taken advantage of this multiple times in my own toy exploits and it's starting to feel cheesy. :^)
This commit is contained in:
parent
536c0ff3ee
commit
a850a89c1b
3 changed files with 25 additions and 8 deletions
|
@ -47,10 +47,12 @@ private:
|
|||
|
||||
class RangeAllocator {
|
||||
public:
|
||||
RangeAllocator(VirtualAddress, size_t);
|
||||
RangeAllocator(const RangeAllocator&);
|
||||
RangeAllocator();
|
||||
~RangeAllocator();
|
||||
|
||||
void initialize_with_range(VirtualAddress, size_t);
|
||||
void initialize_from_parent(const RangeAllocator&);
|
||||
|
||||
Range allocate_anywhere(size_t);
|
||||
Range allocate_specific(VirtualAddress, size_t);
|
||||
void deallocate(Range);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue