Hi, On Sun, 12 Jul 2026 10:50:19 +0200, Igor Opaniuk wrote: > While reviewing the AVB 2.0 integration I noticed several memory leaks in > the verification path that accumulate on every boot. > > In the Android bootmethod, run_avb_verification() allocates an AvbOps via > avb_ops_alloc() and receives an AvbSlotVerifyData from avb_slot_verify(), > but frees neither on the successful return paths. Every boot therefore > leaks the AvbOpsData structure, and with CONFIG_OPTEE_TA_AVB the leaked > AvbOps also leaves the OP-TEE session open (it is only closed inside > avb_ops_free()). The AvbSlotVerifyData - holding the kernel cmdline and > loaded-partition metadata - is leaked on both the locked GREEN/OK and the > unlocked ORANGE/ERROR_VERIFICATION success paths. > > [...]
Thanks, Applied to https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu (u-boot-dfu) [1/2] boot: android: fix AvbOps and verify-data leaks in AVB path https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu/-/commit/a7f65a6b6abc7119394e1ae7f16e3c60d39166c8 [2/2] avb: free mmc_part allocated by get_partition() https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu/-/commit/f9c750ea306877432a525de1ebd9740ec815e5da -- Mattijs
