summaryrefslogtreecommitdiff
path: root/doc/develop
diff options
context:
space:
mode:
authorAlexey Charkov <[email protected]>2026-07-08 21:32:07 +0400
committerMattijs Korpershoek <[email protected]>2026-07-22 08:54:39 +0200
commitee3ab6988860d568b0ba0b568e57335cca2809d4 (patch)
treeb0bffe176563afe659b8c4ab0c8d85e661bc4344 /doc/develop
parentc5c4cc4c6b9887858e168d5106f8f1d3dfb6c3e8 (diff)
boot: android: fix out-of-bounds access in bootconfig parsing
When android_image_get_vendor_bootimg_size is called, its buffer is only allocated with enough space for the bootconfig header, but the android_vendor_boot_image_v3_v4_parse_hdr helper attempts to append a bootconfig trailer to it, causing an out-of-bounds access and heap corruption in some cases (e.g. triggered in sandbox test builds when extra bootmeths are added, resulting in a segfault of the sandbox process). Skip the dangerous memcpy operations altogether when the android_vendor_boot_image_v3_v4_parse_hdr helper is only called for size calculation purposes, and only append the bootconfig trailer when called from the actual bootconfig parsing code path. Fixes: 57e405e1f474 ("android: boot: support bootconfig") Signed-off-by: Alexey Charkov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'doc/develop')
0 files changed, 0 insertions, 0 deletions