Commit e421946b authored by Fullway Wang's avatar Fullway Wang Committed by Helge Deller
Browse files

fbdev: sis: Error out if pixclock equals zero



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.

In sisfb_check_var(), var->pixclock is used as a divisor to caculate
drate before it is checked against zero. Fix this by checking it
at the beginning.

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

Signed-off-by: default avatarFullway Wang <fullwaywang@outlook.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 04e5eac8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment