Re: [PATCH] drm/amdgpu: Fix bounds checking in amdgpu_ras_is_supported()

2019-06-08 Thread Koenig, Christian
James; amd-...@lists.freedesktop.org<mailto:amd-...@lists.freedesktop.org>; dri-devel@lists.freedesktop.org<mailto:dri-devel@lists.freedesktop.org>; kernel-janit...@vger.kernel.org<mailto:kernel-janit...@vger.kernel.org> Subject: [PATCH] drm/amdgpu: Fix bounds checking in amdgpu_ras_is_sup

Re: [PATCH] drm/amdgpu: Fix bounds checking in amdgpu_ras_is_supported()

2019-06-08 Thread Pan, Xinhui
James; amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; kernel-janit...@vger.kernel.org Subject: [PATCH] drm/amdgpu: Fix bounds checking in amdgpu_ras_is_supported() The "block" variable can be set by the user through debugfs, so it can be quite large which leads to shi

[PATCH] drm/amdgpu: Fix bounds checking in amdgpu_ras_is_supported()

2019-06-08 Thread Dan Carpenter
The "block" variable can be set by the user through debugfs, so it can be quite large which leads to shift wrapping here. This means we report a "block" as supported when it's not, and that leads to array overflows later on. This bug is not really a security issue in real life, because debugfs is