fbdev: nvidia: Fix potential divide by zero
stable inclusion from stable-v5.10.177 commit 78eb964805f9ed40270a3c9339d68d7715cea18f category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=78eb964805f9ed40270a3c9339d68d7715cea18f -------------------------------- [ Upstream commit 92e2a00f ] variable var->pixclock can be set by user. In case it equals to zero, divide by zero would occur in nvidiafb_set_par. Similar crashes have happened in other fbdev drivers. There is no check and modification on var->pixclock along the call chain to nvidia_check_var and nvidiafb_set_par. We believe it could also be triggered in driver nvidia from user site. Signed-off-by:Wei Chen <harperchen1110@gmail.com> Signed-off-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com> (cherry picked from commit c0603cfc)
Loading
Please sign in to comment