linux-yocto/drivers/gpu/drm/tiny
Nikita Zhandarovich 3ba56fc34f drm/repaper: fix integer overflows in repeat functions
commit 4d098000ac193f359e6b8ca4801dbdbd6a27b41f upstream.

There are conditions, albeit somewhat unlikely, under which right hand
expressions, calculating the end of time period in functions like
repaper_frame_fixed_repeat(), may overflow.

For instance, if 'factor10x' in repaper_get_temperature() is high
enough (170), as is 'epd->stage_time' in repaper_probe(), then the
resulting value of 'end' will not fit in unsigned int expression.

Mitigate this by casting 'epd->factored_stage_time' to wider type before
any multiplication is done.

Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.

Fixes: 3589211e9b ("drm/tinydrm: Add RePaper e-ink driver")
Cc: stable@vger.kernel.org
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Signed-off-by: Alex Lanzano <lanzano.alex@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250116134801.22067-1-n.zhandarovich@fintech.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-25 10:43:56 +02:00
..
arcpgu.c
bochs.c
cirrus.c drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update() 2023-03-30 12:49:16 +02:00
gm12u320.c drm: gm12u320: Fix the timeout usage for usb_bulk_msg() 2023-09-23 11:11:08 +02:00
hx8357d.c
ili9163.c
ili9225.c
ili9341.c
ili9486.c drm/tiny: ili9486: Do not assume 8-bit only SPI controllers 2023-03-10 09:33:55 +01:00
Kconfig
Makefile
mi0283qt.c
panel-mipi-dbi.c
repaper.c drm/repaper: fix integer overflows in repeat functions 2025-04-25 10:43:56 +02:00
simpledrm.c
st7586.c
st7735r.c