kernel_samsung_a53x/drivers/video/fbdev/savage
Fullway Wang becb0404e1 fbdev: savage: Error out if pixclock equals zero
[ Upstream commit 04e5eac8f3ab2ff52fa191c187a46d4fdbc1e288 ]

The userspace program could pass any values to the driver through
ioctl() interface. If the driver doesn't check the value of pixclock,
it may cause divide-by-zero error.

Although pixclock is checked in savagefb_decode_var(), but it is not
checked properly in savagefb_probe(). Fix this by checking whether
pixclock is zero in the function savagefb_check_var() before
info->var.pixclock is used as the divisor.

This is similar to CVE-2022-3061 in i740fb which was fixed by
commit 15cf0b8.

Signed-off-by: Fullway Wang <fullwaywang@outlook.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 22:25:32 +01:00
..
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
savagefb-i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
savagefb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
savagefb_accel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
savagefb_driver.c fbdev: savage: Error out if pixclock equals zero 2024-11-18 22:25:32 +01:00