David Laight
d8421e0938
fbdev: sm501fb: Fix buffer errors in OF binding code
...
The code that gets the frame buffer mode from OF has 'use after free',
'buffer overrun' and memory leaks.
info->edid_data isn't free if the probe functions fail or if
pd->def_mode is set.
If both the CRT and PANEL are enabled info->edid_data is used after
being freed and is freed twice.
The string returned by of_get_property(np, "mode", &len) is just
written over either the static "640x480-16@60" or the module parameter
string without any regard for the length (which is most likely longer).
Use kstrump() for the OF mode and free everything before freeing 'info.
Fixes: 4295f9bf74 ("video, sm501: add OF binding to support SM501")
Signed-off-by: David Laight <david.laight.linux@gmail.com >
Signed-off-by: Helge Deller <deller@gmx.de >
2026-06-09 16:00:17 +02:00
..
2026-06-07 18:25:42 +02:00
2026-06-09 16:00:11 +02:00
2026-06-07 18:25:41 +02:00
2025-12-02 20:15:51 +01:00
2026-06-07 18:25:41 +02:00
2026-06-07 18:25:41 +02:00
2025-09-30 23:21:34 +02:00
2026-06-09 16:00:11 +02:00
2026-06-07 18:25:42 +02:00
2026-03-10 18:40:21 +01:00
2026-06-09 16:00:10 +02:00
2026-06-09 16:00:11 +02:00
2026-06-07 18:25:41 +02:00
2026-06-09 16:00:11 +02:00
2026-03-10 17:32:35 +01:00
2023-10-19 12:54:16 +02:00
2023-11-29 12:20:08 +01:00
2024-10-08 21:47:18 +02:00
2024-10-08 21:47:18 +02:00
2026-06-07 18:25:41 +02:00
2023-08-04 15:54:34 +02:00
2023-10-19 12:54:38 +02:00
2026-06-09 16:00:11 +02:00
2026-03-05 17:35:12 +01:00
2026-02-14 11:09:47 +01:00
2026-06-07 18:25:42 +02:00
2024-10-15 10:07:32 +02:00
2025-06-16 09:06:58 +02:00
2025-06-16 09:06:58 +02:00
2026-06-07 18:25:42 +02:00
2025-05-31 10:24:01 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00
2026-06-09 16:00:10 +02:00
2026-06-07 18:25:41 +02:00
2026-04-22 16:46:40 +02:00
2026-04-22 16:46:40 +02:00
2026-02-21 17:09:51 -08:00
2026-06-09 16:00:11 +02:00
2025-06-16 09:07:03 +02:00
2023-10-19 12:55:07 +02:00
2026-06-07 18:25:42 +02:00
2024-10-08 21:47:18 +02:00
2026-02-14 11:09:47 +01:00
2023-08-04 15:54:35 +02:00
2025-03-26 22:39:21 +01:00
2023-09-02 08:18:40 -07:00
2025-11-15 13:46:45 +01:00
2026-03-09 13:06:48 +01:00
2026-06-09 16:00:10 +02:00
2025-11-15 13:46:45 +01:00
2026-06-07 18:25:42 +02:00
2024-10-08 21:47:18 +02:00
2024-08-30 18:42:38 +02:00
2026-06-07 18:25:42 +02:00
2024-09-02 13:54:26 +02:00
2026-06-07 18:25:42 +02:00
2026-05-20 20:23:32 +02:00
2024-10-15 10:07:32 +02:00
2026-03-09 13:06:48 +01:00
2025-06-16 09:06:19 +02:00
2026-05-20 20:23:32 +02:00
2023-08-04 15:54:36 +02:00
2026-06-07 18:25:42 +02:00
2026-06-07 18:25:41 +02:00
2024-10-08 21:47:18 +02:00
2026-04-22 15:45:38 +02:00
2024-10-15 10:07:32 +02:00
2024-10-08 21:47:18 +02:00
2026-06-07 18:25:41 +02:00
2026-06-07 18:25:41 +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
2026-06-09 16:00:10 +02:00
2026-06-07 18:25:41 +02:00
2026-02-21 17:09:51 -08:00
2026-06-09 16:00:10 +02:00
2025-12-02 19:49:10 +01:00
2023-08-04 15:54:38 +02:00
2024-10-08 21:47:18 +02:00
2024-10-08 21:47:18 +02:00
2026-06-07 18:25:42 +02:00
2023-11-29 12:20:44 +01:00
2025-06-16 09:06:19 +02:00
2024-10-15 10:07:32 +02:00
2024-11-14 15:26:27 +01:00
2026-06-09 16:00:10 +02:00
2026-02-21 17:09:51 -08:00
2023-07-24 16:50:38 +02:00
2026-06-09 16:00:17 +02:00
2026-06-09 16:00:10 +02:00
2023-11-29 12:20:10 +01:00
2026-02-21 20:03:00 -08:00
2026-06-07 18:25:41 +02:00
2024-10-15 10:07:31 +02:00
2024-01-23 09:13:24 +01:00
2023-10-19 12:56:55 +02:00
2023-08-24 07:26:06 +10:00
2026-06-09 16:00:10 +02:00
2025-12-02 19:44:05 +01:00
2026-06-07 18:25:42 +02:00
2024-01-27 19:03:51 -08:00
2026-06-07 18:25:42 +02:00
2026-05-04 10:35:55 +02:00
2026-06-07 18:25:42 +02:00
2026-02-21 01:02:28 -08:00
2026-06-07 18:25:42 +02:00
2024-10-08 21:47:18 +02:00
2025-12-16 14:12:44 +01:00
2026-02-14 11:09:46 +01:00
2026-06-07 18:25:41 +02:00
2024-10-08 21:47:18 +02:00
2026-03-09 13:06:48 +01:00
2026-02-21 17:09:51 -08:00
2024-10-08 21:47:18 +02:00