]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix buffer overflow in INFO ioctl
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Aug 2020 15:43:45 +0000 (11:43 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 26 Aug 2020 19:45:51 +0000 (15:45 -0400)
commit1bf05116e0db9bab50965344f3a72d54a1588000
tree84d8c39d26ada4d6cd32db4eaa58b4bee0b86ffa
parent88f900cafe52686b22b45aa7a1a9cf9d612744a5
drm/amdgpu: Fix buffer overflow in INFO ioctl

The values for "se_num" and "sh_num" come from the user in the ioctl.
They can be in the 0-255 range but if they're more than
AMDGPU_GFX_MAX_SE (4) or AMDGPU_GFX_MAX_SH_PER_SE (2) then it results in
an out of bounds read.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c