efi: fix and verify variables append_write
Get series with b4
b4 am [email protected] change-id 20261113-append-1cfc64c0e0d8Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | efi_loader: prevent set_variable() to record append_writelib/ | +2 | 1 reply | |
| 2/2 | efi_selftest: verify get_variable() never returns append_writelib/ | +16 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] efi: fix and verify variables append_write
This couple of patches does the following:
- Fix a corner case of the non-TEE SetVariable(), which could record the APPEND_WRITE attribute when appending to non-existing variables.
- Enhance the existing selftest to verify that the APPEND_WRITE attribute is never returned by GetVariable().
See the second patch for the details to run on the sandbox.
I have also verified that the selftest changes do not harm with OP-TEE + StMM. (This hits other issues with QueryVariableInfo() but they are unrelated.)
We could reasonably reduce the test to verify the attributes only in the cases where GetVariable() follows a SetVariable() with the append attribute set, as those are arguably more likely to be buggy.
If this is preferred just let me know and I will send a v2.
---
Vincent Stehlé (2):
efi_loader: prevent set_variable() to record append_write
efi_selftest: verify get_variable() never returns append_write
lib/efi_loader/efi_variable.c | 3 ++- lib/efi_selftest/efi_selftest_variables.c | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-)
---
base-commit: ff8a9bc41e4e5bdd3406932af5abb4c18064e539
change-id: 20261113-append-1cfc64c0e0d8
Best regards,
Signature · 1 line
Vincent.