Skip to content

Commit c193fa9

Browse files
Dan Carpenteralexdeucher
authored andcommitted
drm/amdgpu: information leak in amdgpu_info_ioctl()
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: fa92754 ('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>
1 parent 8faf0e0 commit c193fa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
416416
return n ? -EFAULT : 0;
417417
}
418418
case AMDGPU_INFO_DEV_INFO: {
419-
struct drm_amdgpu_info_device dev_info;
419+
struct drm_amdgpu_info_device dev_info = {};
420420
struct amdgpu_cu_info cu_info;
421421

422422
dev_info.device_id = dev->pdev->device;

0 commit comments

Comments
 (0)