[PATCH 1/1] libavb: fix avb_replace() OOM handling

Simon Glass sjg at chromium.org
Mon May 25 17:15:23 CEST 2026


On 2026-05-21T16:51:21, Josh Law <josh2 at disroot.org> wrote:
> libavb: fix avb_replace() OOM handling
>
> avb_replace() promises NULL on OOM. Once it had built the first
> replacement, a later allocation failure returned that partial buffer.
> Callers treat any result as success, so AVB could keep booting with
> truncated bootargs.
>
> Free the partial result and return NULL. The existing callers can then
> take their OOM path.
>
> Signed-off-by: Josh Law <josh2 at disroot.org>
>
> lib/libavb/avb_util.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list