linux-stable/drivers/gpu/drm/gud
Gustavo A. R. Silva 8fddc4b660 drm/gud: Use size_add() in call to struct_size()
If, for any reason, the open-coded arithmetic causes a wraparound, the
protection that `struct_size()` adds against potential integer overflows
is defeated. Fix this by hardening call to `struct_size()` with `size_add()`.

Fixes: 40e1a70b4a ("drm: Add GUD USB Display driver")
Signed-off-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/ZQSlyHKPdw/zsy4c@work
Signed-off-by: Kees Cook <keescook@chromium.org>
2023-09-29 14:48:32 -07:00
..
Kconfig drm/shmem-helper: Switch to vmf_insert_pfn 2021-08-12 21:41:10 +02:00
Makefile
gud_connector.c drm/connector: Rename drm_mode_create_tv_properties 2022-11-24 12:42:39 +01:00
gud_drv.c drm/gud: use new debugfs device-centered functions 2023-01-06 16:15:08 -03:00
gud_internal.h drm/gud: Use the shadow plane helper 2022-12-06 16:38:05 +01:00
gud_pipe.c drm/gud: Use size_add() in call to struct_size() 2023-09-29 14:48:32 -07:00