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.
main
Thomas Hellstrom 2006-12-19 23:23:17 +01:00
parent 81251bf78f
commit 72b5d1507a
1 changed files with 1 additions and 0 deletions

View File

@ -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 */