mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 04:28:52 +01:00
kernel/vm: Block non-root teams from inspecting other teams' memory properties.
This commit is contained in:
parent
f3f347f90d
commit
07ed8d0df8
@ -6595,6 +6595,10 @@ _user_get_memory_properties(team_id teamID, const void* address,
|
||||
if (!IS_USER_ADDRESS(_protected) || !IS_USER_ADDRESS(_lock))
|
||||
return B_BAD_ADDRESS;
|
||||
|
||||
if (teamID != B_CURRENT_TEAM && teamID != team_get_current_team_id()
|
||||
&& geteuid() != 0)
|
||||
return B_NOT_ALLOWED;
|
||||
|
||||
AddressSpaceReadLocker locker;
|
||||
status_t error = locker.SetTo(teamID);
|
||||
if (error != B_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user