Sergey Shtylyov
ab91647acd
fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod()
...
[ Upstream commit 3f6dae09fc ]
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 >
2025-06-19 15:28:25 +02:00
..
2023-09-23 20:50:29 +02:00
2025-06-19 15:28:25 +02:00
2023-08-04 15:54:35 +02:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:39 +02:00
2023-08-24 07:26:06 +10:00
2023-07-24 16:50:39 +02:00
2023-08-24 07:26:06 +10:00
2023-09-23 20:35:14 +02:00
2023-07-24 16:50:38 +02:00
2025-02-21 13:57:09 +01:00
2025-04-25 10:45:20 +02:00
2023-07-24 16:50:38 +02:00
2024-06-16 13:47:37 +02:00
2024-10-17 15:24:22 +02:00
2023-07-24 16:50:38 +02:00
2024-04-13 13:07:39 +02:00
2023-07-24 16:50:38 +02:00
2024-01-25 15:35:45 -08:00
2023-07-24 16:50:39 +02:00
2023-08-24 07:26:06 +10:00
2023-07-24 16:50:39 +02:00
2023-08-04 15:54:34 +02:00
2023-07-24 16:50:39 +02:00
2023-08-24 07:26:06 +10:00
2025-04-10 14:37:29 +02:00
2023-07-20 07:52:54 +02:00
2023-07-31 20:07:24 +02:00
2023-08-24 07:26:06 +10:00
2023-08-04 15:54:35 +02:00
2023-08-24 07:26:06 +10:00
2023-08-24 07:26:06 +10:00
2023-08-24 07:26:06 +10:00
2023-08-04 15:54:35 +02:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2023-08-04 15:54:35 +02:00
2024-10-10 11:57:31 +02:00
2023-08-24 07:26:06 +10:00
2023-08-24 07:26:06 +10:00
2023-08-04 15:54:35 +02:00
2025-06-04 14:41:55 +02:00
2023-09-02 08:18:40 -07:00
2023-07-24 16:50:38 +02:00
2023-08-24 07:26:06 +10:00
2023-08-24 07:26:06 +10:00
2023-08-04 15:54:36 +02:00
2023-07-31 20:07:24 +02:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2024-10-04 16:29:06 +02:00
2025-03-22 12:50:37 -07:00
2023-08-04 15:54:36 +02:00
2023-11-20 11:59:38 +01:00
2024-01-25 15:35:40 -08:00
2024-06-12 11:12:02 +02:00
2023-08-24 07:26:06 +10:00
2023-08-04 15:54:36 +02:00
2023-08-31 22:58:25 +02:00
2023-08-04 15:54:36 +02:00
2023-07-31 20:07:24 +02:00
2023-09-01 00:29:33 +02:00
2023-08-04 15:54:37 +02:00
2023-08-04 15:54:37 +02:00
2023-08-24 07:26:06 +10:00
2023-08-24 07:26:06 +10:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2023-08-04 15:54:37 +02:00
2023-08-04 15:54:37 +02:00
2023-08-04 15:54:37 +02:00
2023-08-03 16:08:14 +02:00
2023-07-24 16:50:38 +02:00
2023-04-24 11:48:31 +02:00
2023-08-04 15:54:37 +02:00
2024-10-10 11:57:31 +02:00
2023-08-04 15:54:38 +02:00
2023-07-24 16:50:38 +02:00
2023-08-04 15:54:38 +02:00
2023-10-16 23:04:27 +02:00
2023-07-20 07:56:30 +02:00
2024-12-09 10:32:21 +01:00
2024-06-12 11:11:58 +02:00
2023-08-04 15:54:38 +02:00
2023-07-24 16:50:38 +02:00
2025-04-10 14:37:29 +02:00
2023-07-24 16:50:39 +02:00
2023-07-24 16:50:38 +02:00
2024-06-12 11:12:24 +02:00
2023-08-04 15:54:38 +02:00
2023-06-30 17:14:14 +02:00
2023-08-24 07:26:06 +10:00
2023-08-24 07:26:06 +10:00
2023-08-24 07:26:06 +10:00
2023-08-24 07:26:06 +10:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2023-10-16 23:19:34 +02:00
2023-08-04 15:54:38 +02:00
2024-08-11 12:47:16 +02:00
2023-07-24 16:50:39 +02:00
2023-07-24 16:50:39 +02:00
2023-07-24 16:50:38 +02:00
2023-07-24 16:50:38 +02:00
2023-05-18 11:06:19 +02:00
2023-07-31 20:07:24 +02:00
2023-08-24 07:26:06 +10:00