Skip to content

Fix use of sign_hash via API

Patrick Uiterwijk linux-integrity 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Using sys/xattr.h
- Removed copyright line for sign_ima

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Fix sign_hash not observing the hashalgo argumentsrc/libimaevm.c+2 -20 replies
2/2Add test for using sign_hash APIsrc/evmctl.c src/utils.c src/utils.h +4 more+107 -291 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMimi Zohar
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH ima-evm-utils v2 0/2] Fix use of sign_hash via API

When using sign_hash, the resulting signature is incorrect if any hash algorithm other than sha1 is used.
This is because while the sign_hash function has a hashalgo argument, the sign_hash_v2 function does not actually use this argument for anything except setting the hash_algo value in the header. This patch makes sure it uses the algo variable consistently.

Changes since v1:
- Using sys/xattr.h
- Removed copyright line for sign_ima

Patrick Uiterwijk (2):
Fix sign_hash not observing the hashalgo argument Add test for using sign_hash API

 src/evmctl.c                | 23 ----------------
 src/libimaevm.c             |  4 +--
 src/utils.c                 | 20 ++++++++++++++
 src/utils.h                 |  1 +
 tests/.gitignore            |  2 ++
 tests/Makefile.am           |  5 ++++
 tests/sign_verify.apitest.c | 55 +++++++++++++++++++++++++++++++++++++
 tests/sign_verify.test      | 30 ++++++++++++++++----
 8 files changed, 109 insertions(+), 31 deletions(-)
 create mode 100644 tests/sign_verify.apitest.c
Signature · 1 line
2.31.1