diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-05 11:05:03 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-08-05 11:05:03 +0000 |
commit | 7f5bfff5a5ade8f6398a33394a8b3b8856130beb (patch) | |
tree | 089133d593521843a787adc912d503669f414256 | |
parent | 82ee8c07761e82d76979b285430d144da8fd844c (diff) |
drm/amdgpu: Prevent kernel-infoleak in amdgpu_info_ioctl()
From Peilin Ye
dd4672ba579a78f14dab65062d95c16f0835947b in linux 5.7.y/5.7.13
543e8669ed9bfb30545fd52bc0e047ca4df7fb31 in mainline linux
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c index e12a51a50a5..8768908bd55 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c @@ -747,9 +747,10 @@ 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; uint64_t vm_size; + memset(&dev_info, 0, sizeof(dev_info)); dev_info.device_id = dev->pdev->device; dev_info.chip_rev = adev->rev_id; dev_info.external_rev = adev->external_rev_id; |