mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-05 06:38:03 +02:00
Security fix. Zero pages before they are handed to user space.
Shared memory areas were not cleared when they are allocated and handed to user space. Sensitive information may leak.
This commit is contained in:
parent
81251bf78f
commit
72b5d1507a
1 changed files with 1 additions and 0 deletions
|
|
@ -202,6 +202,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
|
|||
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(map->handle, 0, map->size);
|
||||
map->offset = (unsigned long)map->handle;
|
||||
if (map->flags & _DRM_CONTAINS_LOCK) {
|
||||
/* Prevent a 2nd X Server from creating a 2nd lock */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue