From: Michael Vogt Date: Fri, 13 Mar 2026 10:33:25 +0000 (+0100) Subject: boot: check that `ret_version` is valid in tpm_log_tagged_event X-Git-Tag: v260-rc4~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95aff47112cff5607db7e34d78aa9db813818405;p=thirdparty%2Fsystemd.git boot: check that `ret_version` is valid in tpm_log_tagged_event In a project I'm working on I recently observed a boot failure with the most recent version of systemd. It seems it is triggered by bb19b61049 which fixed a bug that now leads to the function being excuted differently. The code is missing a check if `*ret_version` is actually valid in the `ret_measured = true` case. --- diff --git a/src/boot/measure.c b/src/boot/measure.c index 3c51998d1b2..cf3d4254b86 100644 --- a/src/boot/measure.c +++ b/src/boot/measure.c @@ -312,7 +312,8 @@ EFI_STATUS tpm_log_tagged_event( if (err != EFI_SUCCESS) return err; - *ret_measured = true; + if (ret_measured) + *ret_measured = true; return EFI_SUCCESS; }