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-11 09:40:30 -06:00
2025-04-05 10:30:12 +02:00
2025-04-02 20:27:18 -07:00
2025-03-11 14:05:43 +01:00
2025-03-10 07:31:51 +01:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-03-20 09:11:09 +01:00
2025-04-05 10:30:12 +02:00
2025-04-03 12:21:44 -07:00
2025-04-04 09:49:17 -07:00
2025-04-05 10:30:12 +02:00
2025-04-02 18:03:34 -07:00
2025-04-05 10:30:12 +02:00
2025-03-25 20:40:51 -07:00
2025-04-05 10:30:12 +02:00
2025-04-02 20:04:43 -07:00
2025-03-17 22:06:41 -07:00
2025-04-05 10:30:12 +02:00
2025-04-08 11:48:39 +02:00
2025-03-20 21:38:01 +01:00
2025-03-25 14:00:26 -07:00
2025-04-05 10:30:12 +02:00
2025-04-09 09:03:15 +02:00
2025-03-21 20:57:55 -03:00
2025-03-26 21:48:21 -07:00
2025-04-14 10:19:20 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-01 09:29:18 -07:00
2025-04-05 10:30:12 +02:00
2025-03-21 17:12:04 -05:00
2025-04-01 11:26:08 -07:00
2025-04-05 10:30:12 +02:00
2025-03-31 11:44:00 +02:00
2025-03-25 15:00:18 -07:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-06 08:35:37 -07:00
2025-04-05 10:30:12 +02:00
2025-04-04 16:39:10 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-03-26 19:57:34 -07:00
2025-03-29 14:33:13 -07:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:17 +02:00
2025-04-05 10:30:12 +02:00
2025-04-04 14:23:07 -07:00
2025-04-02 20:27:18 -07:00
2025-04-05 10:30:12 +02:00
2025-03-19 19:17:58 +01:00
2025-03-29 11:23:16 -07:00
2025-03-09 22:27:54 +01:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-03-28 19:36:53 -07:00
2025-04-01 12:47:11 -07:00
2025-03-29 16:59:16 -07:00
2025-04-07 14:35:48 +02:00
2025-03-17 11:12:01 +01:00
2025-04-02 18:09:17 -07:00
2025-04-01 14:21:02 -07:00
2025-03-25 15:00:18 -07:00
2025-04-05 10:30:17 +02:00
2025-04-05 10:30:12 +02:00
2025-03-29 16:59:16 -07:00
2025-03-10 17:37:25 +01:00
2025-04-02 10:30:10 -07:00
2025-03-22 08:42:39 -05:00
2025-03-29 17:18:50 -07:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-03-11 10:41:18 +01:00
2025-04-04 09:06:32 -07:00
2025-04-01 12:43:13 -07:00
2025-04-04 09:09:34 -07:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-01 16:51:44 -07:00
2025-04-02 18:23:31 -07:00
2025-04-05 10:30:12 +02:00
2025-03-28 11:22:54 -07:00
2025-04-05 10:30:12 +02:00
2025-04-01 19:35:19 -07:00
2025-04-01 18:52:54 -07:00
2025-04-07 14:35:48 +02:00
2025-04-05 10:30:12 +02:00
2025-04-01 18:52:54 -07:00
2025-04-05 10:30:12 +02:00
2025-04-01 09:29:18 -07:00