From 95aff47112cff5607db7e34d78aa9db813818405 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 13 Mar 2026 11:33:25 +0100 Subject: [PATCH] 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. --- src/boot/measure.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/boot/measure.c b/src/boot/measure.c index 3c51998d1b..cf3d4254b8 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; }