VM: Fix vm_block_address_range() area protection
B_ALREADY_WIRED, which was erroneously passed for the area protection parameter to map_backing_store(), has the value 7 which implies user readable and writable. Hence the address ranges around 0xdeadbeef and 0xcccccccc could actually be read and written from anywhere.
This commit is contained in:
parent
ce577d8db0
commit
d482342399
@ -1005,8 +1005,8 @@ vm_block_address_range(const char* name, void* address, addr_t size)
|
||||
addressRestrictions.address = address;
|
||||
addressRestrictions.address_specification = B_EXACT_ADDRESS;
|
||||
status = map_backing_store(addressSpace, cache, 0, name, size,
|
||||
B_ALREADY_WIRED, B_ALREADY_WIRED, REGION_NO_PRIVATE_MAP, 0,
|
||||
&addressRestrictions, true, &area, NULL);
|
||||
B_ALREADY_WIRED, 0, REGION_NO_PRIVATE_MAP, 0, &addressRestrictions,
|
||||
true, &area, NULL);
|
||||
if (status != B_OK) {
|
||||
cache->ReleaseRefAndUnlock();
|
||||
return status;
|
||||
|
Loading…
Reference in New Issue
Block a user