Thomas Zimmermann
df6dc12e5e
drm/udl: Validate length in vendor-descriptor parser
...
Rewrite the parser for the vendor firmware descriptor with the
following improvements.
- Validate the key-value length given in a vendor descriptor
against the length of the descriptor. The current code fails
to do this and might read more bytes than available. This can
lead to out-of-bounds reads of the allocated buffer.
- Read raw data with helpers for unaligned data. This allows
the code to run on platforms that do now support unaligned memory
access by default.
- Validate the pixel limit against a default value. The default
comes from real-world devices. If the reported number of pixels
is significantly above the limit, it is likely invalid.
- Drop the obsolete print macros. There is still a warning about
invalid firmware descriptors. The rest of the output is bogus.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Link: https://lore.kernel.org/r/20250410105948.25463-9-tzimmermann@suse.de
2025-04-14 10:19:20 +02:00
..
2025-04-07 14:35:48 +02:00
2025-04-07 14:35:48 +02:00
2025-02-18 07:43:43 +01:00
2024-12-13 08:48:09 +10:00
2025-02-26 15:27:06 +01:00
2025-04-07 15:08:48 +02:00
2024-12-13 08:48:09 +10:00
2025-04-07 15:48:23 +03:00
2025-03-25 16:29:58 +05:30
2025-03-11 12:51:21 +01:00
2025-04-07 15:49:19 +03:00
2025-02-12 11:59:52 +01:00
2025-04-05 10:30:12 +02:00
2025-03-06 12:37:33 -05:00
2025-04-07 14:35:48 +02:00
2025-04-07 14:35:48 +02:00
2025-04-11 14:42:13 +03:00
2025-03-09 23:46:56 +00:00
2025-04-11 18:55:26 +05:30
2025-04-07 14:35:48 +02:00
2025-03-20 14:45:38 +01:00
2025-03-20 14:45:38 +01:00
2024-12-13 08:48:09 +10:00
2024-10-03 18:19:38 +02:00
2025-04-07 14:35:48 +02:00
2024-12-13 08:48:09 +10:00
2025-02-14 00:54:29 +02:00
2025-03-20 14:45:38 +01:00
2025-04-07 14:35:48 +02:00
2025-03-20 14:45:38 +01:00
2025-02-11 10:53:53 +01:00
2025-04-07 15:48:23 +03:00
2025-03-12 09:14:29 +01:00
2025-04-07 14:35:48 +02:00
2025-04-07 14:35:48 +02:00
2025-04-10 18:17:37 +02:00
2025-03-31 12:12:55 +01:00
2025-04-10 15:00:11 +02:00
2025-03-07 10:25:10 +01:00
2025-01-07 12:45:19 +02:00
2025-04-07 14:35:48 +02:00
2025-04-11 17:02:47 +01:00
2025-04-10 10:38:26 +02:00
2025-04-07 14:35:48 +02:00
2025-01-16 10:48:47 +01:00
2025-03-10 16:25:01 -04:00
2025-04-03 17:22:56 +02:00
2025-03-20 14:45:38 +01:00
2024-12-13 08:48:09 +10:00
2025-04-14 10:16:14 +02:00
2025-04-02 17:41:27 +03:00
2025-03-26 23:00:22 +03:00
2025-03-20 14:45:38 +01:00
2024-12-13 08:48:09 +10:00
2025-04-07 14:35:48 +02:00
2025-03-14 07:54:39 +01:00
2024-12-13 08:48:09 +10:00
2025-04-14 10:19:20 +02:00
2025-04-07 14:35:48 +02:00
2025-02-28 09:05:10 +01:00
2025-04-07 14:35:48 +02:00
2025-04-07 14:35:48 +02:00
2025-03-06 15:21:36 +01:00
2025-04-07 14:35:48 +02:00
2025-04-07 14:35:48 +02:00
2025-04-06 08:35:37 -07:00
2024-12-05 12:35:42 +02:00
2025-03-20 14:45:38 +01:00
2025-03-20 14:45:48 +01:00
2025-03-28 17:44:52 -07:00
2025-03-20 14:45:46 +01:00
2025-03-20 14:45:48 +01:00
2025-04-07 11:38:05 +02:00
2025-01-14 20:43:19 +05:30
2025-03-05 21:48:49 +01:00
2025-03-13 18:33:57 +02:00
2025-03-26 22:59:56 +03:00
2025-03-10 18:18:37 +02:00
2025-01-07 12:45:19 +02:00
2025-03-27 14:02:57 +02:00
2025-01-08 01:39:58 +02:00
2025-03-03 14:45:40 +02:00
2025-03-12 10:50:32 +01:00
2024-12-10 14:36:41 +01:00
2025-04-07 14:35:48 +02:00
2025-03-12 10:50:33 +01:00
2025-04-02 17:19:54 -04:00
2025-03-06 08:59:17 +01:00
2025-03-05 21:48:50 +01:00
2025-02-27 09:37:55 +01:00
2024-09-26 09:31:28 +02:00
2024-09-26 09:31:29 +02:00
2025-02-07 15:23:36 +01:00
2025-04-07 08:45:31 +02:00
2025-04-01 15:35:22 +02:00
2024-09-26 08:27:49 +02:00
2024-11-25 16:09:48 -08:00
2025-03-06 08:59:01 +01:00
2025-03-26 22:59:56 +03:00
2025-04-04 15:56:44 +03:00
2025-03-26 23:00:02 +03:00
2025-04-01 09:29:18 -07:00
2025-03-26 22:59:56 +03:00
2024-10-08 10:00:30 +02:00
2025-01-21 10:32:31 +01:00
2025-03-06 08:59:20 +01:00
2025-03-30 19:47:12 +03:00
2024-12-17 15:43:04 +02:00
2025-01-10 14:24:17 +10:00
2024-10-18 09:23:03 +02:00
2025-02-17 14:17:55 +01:00
2024-11-21 09:28:15 -06:00
2025-03-15 20:49:38 +02:00
2025-04-08 09:39:50 -07:00
2025-04-07 14:35:48 +02:00
2025-04-10 10:50:58 +02:00
2025-03-26 22:59:56 +03:00
2024-12-10 14:08:40 +02:00
2025-03-24 09:31:03 +01:00
2025-04-01 18:30:25 +02:00
2025-02-21 09:20:31 +01:00
2025-01-08 18:15:03 +01:00
2025-04-05 10:30:12 +02:00
2025-02-20 15:02:09 +01:00
2025-04-07 14:35:48 +02:00
2025-04-10 14:06:06 +02:00
2025-04-07 14:35:48 +02:00