diff options
| author | Osama Abdelkader <osama.abdelkader@gmail.com> | 2026-07-20 13:32:11 +0200 |
|---|---|---|
| committer | Steven Price <steven.price@arm.com> | 2026-07-29 15:52:33 +0100 |
| commit | 8321b093fa6c297b80586460ce6914d9655df170 (patch) | |
| tree | a75aed09c6c99fcb58dd3c00d891d5be40cd4bbf /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | bbcf7f0ee9530c5e5b9b6efa82d19ef66c0dfbc3 (diff) | |
drm/panthor: harden firmware build-info bounds checks
panthor_fw_read_build_info() checks whether the metadata range fits in the
firmware image with hdr.meta_start + hdr.meta_size. Both fields are u32, so
the addition can wrap and let an out-of-bounds range pass validation.
The function also reads the "git_sha: " prefix without first checking that
the metadata is long enough, and meta_size == 0 can underflow the NULL
terminator index.
Use subtraction-based bounds checking and reject metadata that is too short
to contain the expected prefix and trailing NULL byte.
Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block")
Cc: stable@vger.kernel.org
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patch.msgid.link/20260720113212.11981-1-osama.abdelkader@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
