Sergey Shtylyov
05f6af15b8
fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod()
...
[ Upstream commit 3f6dae09fc8c306eb70fdfef70726e1f154e173a ]
In fb_find_mode_cvt(), iff mode->refresh somehow happens to be 0x80000000,
cvt.f_refresh will become 0 when multiplying it by 2 due to overflow. It's
then passed to fb_cvt_hperiod(), where it's used as a divider -- division
by 0 will result in kernel oops. Add a sanity check for cvt.f_refresh to
avoid such overflow...
Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.
Fixes: 96fe6a2109 ("[PATCH] fbdev: Add VESA Coordinated Video Timings (CVT) support")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru >
Signed-off-by: Helge Deller <deller@gmx.de >
Signed-off-by: Sasha Levin <sashal@kernel.org >
Signed-off-by: Ulrich Hecht <uli@kernel.org >
2025-12-24 11:24:00 +00:00
..
2023-11-08 11:21:09 +01:00
2025-12-24 11:24:00 +00:00
2023-04-05 11:14:20 +02:00
2017-11-02 11:10:55 +01:00
2023-04-05 11:14:20 +02:00
2021-09-22 11:45:28 +02:00
2023-08-11 11:33:32 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2023-08-30 16:35:11 +02:00
2023-04-05 11:14:19 +02:00
2023-08-11 11:33:37 +02:00
2025-12-24 11:23:33 +00:00
2023-08-11 11:33:32 +02:00
2025-12-24 11:20:37 +00:00
2025-12-24 11:22:04 +00:00
2023-01-18 09:26:26 +01:00
2025-12-24 11:20:08 +00:00
2017-09-04 16:00:49 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2022-08-25 11:11:25 +02:00
2022-08-25 11:11:27 +02:00
2021-09-22 11:45:28 +02:00
2017-11-02 11:10:55 +01:00
2022-04-20 09:08:11 +02:00
2017-11-02 11:10:55 +01:00
2018-02-22 15:42:27 +01:00
2025-12-24 11:23:26 +00:00
2023-08-11 11:33:49 +02:00
2017-08-01 17:20:40 +02:00
2017-08-07 17:22:13 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-07 17:22:13 +02:00
2017-08-07 17:22:13 +02:00
2017-08-07 17:22:13 +02:00
2022-09-15 12:23:52 +02:00
2022-04-20 09:08:22 +02:00
2019-02-12 19:46:06 +01:00
2017-08-01 17:20:39 +02:00
2017-12-20 10:10:23 +01:00
2017-09-04 16:00:49 +02:00
2017-08-01 17:20:39 +02:00
2017-09-04 16:00:49 +02:00
2017-11-02 11:10:55 +01:00
2023-09-23 10:47:01 +02:00
2017-09-04 16:00:50 +02:00
2017-08-07 17:22:13 +02:00
2017-09-04 16:00:49 +02:00
2025-12-24 11:23:47 +00:00
2019-04-03 06:25:07 +02:00
2017-09-04 16:00:49 +02:00
2021-05-26 11:47:01 +02:00
2025-12-24 11:21:48 +00:00
2021-01-12 20:09:09 +01:00
2022-08-25 11:11:37 +02:00
2023-08-11 11:33:32 +02:00
2023-08-11 11:33:49 +02:00
2025-12-24 11:20:29 +00:00
2017-08-07 17:22:13 +02:00
2017-11-02 11:10:55 +01:00
2017-09-04 16:00:50 +02:00
2020-08-21 09:48:04 +02:00
2017-08-07 17:22:13 +02:00
2017-08-07 17:22:13 +02:00
2023-01-18 09:26:25 +01:00
2023-08-11 11:33:32 +02:00
2017-09-04 16:00:50 +02:00
2017-09-04 16:00:50 +02:00
2017-09-04 16:00:50 +02:00
2017-09-04 16:00:49 +02:00
2020-11-05 11:06:54 +01:00
2022-09-28 10:56:49 +02:00
2017-11-02 11:10:55 +01:00
2020-02-28 16:35:56 +01:00
2017-11-02 11:10:55 +01:00
2025-12-24 11:21:58 +00:00
2017-09-04 16:00:50 +02:00
2022-08-25 11:11:27 +02:00
2019-11-24 08:23:21 +01:00
2017-11-02 11:10:55 +01:00
2025-12-24 11:22:22 +00:00
2025-12-24 11:20:28 +00:00
2017-11-02 11:10:55 +01:00
2017-09-04 16:00:49 +02:00
2025-12-24 11:23:27 +00:00
2019-05-25 18:25:29 +02:00
2022-04-20 09:08:23 +02:00
2022-11-03 23:50:53 +09:00
2019-10-07 18:54:58 +02:00
2025-12-24 11:17:43 +00:00
2023-06-09 10:22:49 +02:00
2017-08-01 17:20:43 +02:00
2017-08-07 17:22:13 +02:00
2017-08-01 17:20:41 +02:00
2017-08-07 17:22:13 +02:00
2017-08-01 17:20:43 +02:00
2023-04-05 11:14:19 +02:00
2017-08-01 17:20:41 +02:00
2017-12-20 10:10:23 +01:00
2023-11-08 11:21:09 +01:00
2018-04-12 12:32:15 +02:00
2020-10-29 09:07:05 +01:00
2022-08-25 11:11:27 +02:00
2022-04-20 09:08:22 +02:00
2017-11-02 11:10:55 +01:00
2017-08-21 16:49:57 +02:00