vm: force userland to use B_RANDOMIZED_* address specifications
This commit is contained in:
@@ -6145,6 +6145,11 @@ _user_create_area(const char* userName, void** userAddress, uint32 addressSpec,
|
||||
&& IS_KERNEL_ADDRESS(address))
|
||||
return B_BAD_VALUE;
|
||||
|
||||
if (addressSpec == B_ANY_ADDRESS)
|
||||
addressSpec = B_RANDOMIZED_ANY_ADDRESS;
|
||||
if (addressSpec == B_BASE_ADDRESS)
|
||||
addressSpec = B_RANDOMIZED_BASE_ADDRESS;
|
||||
|
||||
fix_protection(&protection);
|
||||
|
||||
virtual_address_restrictions virtualRestrictions = {};
|
||||
|
||||
Reference in New Issue
Block a user