summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/gecko.py
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-04-10 13:59:05 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2025-04-14 11:19:20 +0300
commitdf6dc12e5e6ddbf2a59d5283fcf6ccd0b3d0334d (patch)
treedaf2e589b00488623c47a1f1174f0630296505cd /tools/perf/scripts/python/gecko.py
parentf4fce9ea8473ab8f91c0aa0855b9d51313b8000e (diff)
downloadlinux-df6dc12e5e6ddbf2a59d5283fcf6ccd0b3d0334d.tar.xz
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
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions