Add virtual screen size check to drm_fb_helper_check_var() in
order to validate userspace input.
Found by Linux Verification Center (linuxtesting.org) with syzkaller.
Signed-off-by: Andrey Strachuk
Fixes: 6c11df58fd1a ("fbmem: Check virtual screen sizes in fb_set_var()")
---
drive
Add virtual screen size check to drm_fb_helper_check_var() in
order to validate userspace input.
Found by Linux Verification Center (linuxtesting.org) with syzkaller.
Signed-off-by: Andrey Strachuk
Fixes: 785b93ef8c30 ("drm/kms: move driver specific fb common code to helper
function
Make sure that virtual screen size is not less than physical screen one.
Reviewed-by: Geert Uytterhoeven
Signed-off-by: Andrey Strachuk
---
drivers/gpu/drm/drm_fb_helper.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm
Local variable 'rq' is initialized by an address
of field of drm_sched_job, so it does not make
sense to compare 'rq' with NULL.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Andrey Strachuk
Fixes: 7c6e68c777f1 ("drm/amdgpu: A