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:
Thomas Hellstrom 2006-12-19 23:23:17 +01:00
parent 81251bf78f
commit 72b5d1507a

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