From 72b5d1507a7e9c18fc0141c13819ea01c0813924 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 19 Dec 2006 23:23:17 +0100 Subject: [PATCH] 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. --- linux-core/drm_bufs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c index d6ebc8d..ef110c2 100644 --- a/linux-core/drm_bufs.c +++ b/linux-core/drm_bufs.c @@ -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 */ -- 2.7.4