summaryrefslogtreecommitdiff
path: root/doc/develop/bootstd
diff options
context:
space:
mode:
authorIgor Opaniuk <[email protected]>2026-07-12 10:50:20 +0200
committerMattijs Korpershoek <[email protected]>2026-07-24 14:43:05 +0200
commita7f65a6b6abc7119394e1ae7f16e3c60d39166c8 (patch)
treed7f6dc9714c791d750329a136301780ff3e76a11 /doc/develop/bootstd
parentb6056097247385c24c23ef39ebc04238336d11e2 (diff)
boot: android: fix AvbOps and verify-data leaks in AVB path
run_avb_verification() allocates an AvbOps via avb_ops_alloc() but never frees it on any return path. Every Android boot attempt therefore leaks the AvbOpsData structure and, when CONFIG_OPTEE_TA_AVB is enabled, leaves the OP-TEE session open (it is only closed inside avb_ops_free()). In addition, the AvbSlotVerifyData returned by avb_slot_verify() is only released on the failure branches. The successful "return 0" paths (both the locked GREEN/OK case and the unlocked ORANGE/ERROR_VERIFICATION case) return without freeing it, leaking the whole out_data (cmdline and loaded partition metadata) on every good boot. Route all exit paths through a single cleanup label that frees both out_data and avb_ops. Fixes: 125d9f3306ea ("bootstd: Add a bootmeth for Android") Signed-off-by: Igor Opaniuk <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'doc/develop/bootstd')
0 files changed, 0 insertions, 0 deletions