]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: information leak in amdgpu_info_ioctl()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 28 Jul 2015 15:51:29 +0000 (18:51 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Jul 2015 19:50:37 +0000 (15:50 -0400)
We recently changed the drm_amdgpu_info_device struct so now there is
a 4 byte hole at the end.  We need to initialize it so we don't disclose
secret information from the stack.

Fixes: fa92754e9c47 ('drm/amdgpu: add VCE harvesting instance query')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

index d316bda3d7ae260f31fe6ad1e68db46aafd4ecd5..9736892bcdf932c328a883473a6c3e23d560cd38 100644 (file)
@@ -416,7 +416,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
                return n ? -EFAULT : 0;
        }
        case AMDGPU_INFO_DEV_INFO: {
-               struct drm_amdgpu_info_device dev_info;
+               struct drm_amdgpu_info_device dev_info = {};
                struct amdgpu_cu_info cu_info;
 
                dev_info.device_id = dev->pdev->device;