drm/amdgpu: validate user GEM object size
When creating frame buffer, userspace may request to attach to a previously allocated GEM object that is smaller than what GPU requires. Validation must be done to prevent out-of-bound DMA, otherwise it could be exploited to reveal sensitive data. This fix is not done in a common code path because individual driver might have different requirement. Cc: stable@vger.kernel.org # v4.2+ Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com> Signed-off-by: NYu Zhao <yuzhao@google.com> Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Showing
想要评论请 注册 或 登录