summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorPengpeng Hou <pengpeng@iscas.ac.cn>2026-08-13 23:23:57 +0800
committerMika Westerberg <mika.westerberg@linux.intel.com>2026-08-31 08:48:01 +0200
commitb946f490be576691c4c47998cf1d4e41d637fbfb (patch)
treec906a204472c8aedd20e454e7e0df7bdb5e71f6d /scripts/Makefile.thinlto
parentae35035da9dace0557ae61f4d4b8e7b720735954 (diff)
downloadlinux-next-b946f490be576691c4c47998cf1d4e41d637fbfb.tar.gz
linux-next-b946f490be576691c4c47998cf1d4e41d637fbfb.zip
thunderbolt: Require complete DROM entry headers
tb_drom_parse_entries() checks for one byte remaining before reading a DROM entry header, but the header occupies two bytes. It also accepts a declared length of one byte. A one-byte tail consequently makes the parser read entry->len outside the DROM. A one-byte generic string entry reaches the subtype parser and underflows its payload-length calculation. Require a complete entry header before reading it and require the declared entry length to cover that header. Use subtraction-based bounds checks so the firmware-provided length cannot overflow the DROM extent calculation. While at it, use the actual const type instead of void * to make it clear we only read these. Assisted-by: Codex:gpt-5 Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions