Skip to contentSkip to conversation

drm: potential info leak in compat_drm_getclient()

PATCH New Dan Carpenter 1 participant 1 message Sep 23, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: potential info leak in compat_drm_getclient()

Smatch has a new check for Rosenberg type information leaks where structs are copied to the user with uninitialized stack data in them.

The c32.idx member wasn't initialized.

drivers/gpu/drm/drm_ioc32.c +1 -0
index 4a058c7..050bd49 100644
@@ -314,6 +314,7 @@ static int compat_drm_getclient(struct file *file, unsigned int cmd,
 	if (err)
 		return err;
 
+	c32.idx = idx;
 	if (__get_user(c32.auth, &client->auth)
 	    || __get_user(c32.pid, &client->pid)
 	    || __get_user(c32.uid, &client->uid)