Skip to content

address deprecated warnings

Mimi Zohar linux-integrity 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest17 patches 11 repliesIn review
  2. v417 patches 13 repliesSuperseded
  3. v315 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v212 patches8 repliesSuperseded
v111 patches6 repliesSuperseded

Changes in v5 from the cover letter

- Addressed Stefan's comments: add missing error message, update error message text, identifying SSL major version, and make sure other key files are regular files.
- Add missing sm2/sm3 "skipped" message.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17Revert "Reset 'errno' after failure to open or access a file"src/evmctl.c src/libimaevm.c+2 -203 replies
2/17log and reset 'errno' after failure to open non-critical filessrc/evmctl.c+10 -25 replies
3/17Log and reset 'errno' on lsetxattr failuresrc/evmctl.c+13 -50 replies
4/17travis: update dist=focal.travis.yml+1 -10 replies
5/17Update configure.ac to address a couple of obsolete warningsacinclude.m4 configure.ac m4/manpage-docbook-xsl.m4+2 -60 replies
6/17Deprecate IMA signature version 1configure.ac src/Makefile.am src/evmctl.c +2 more+66 -130 replies
7/17Replace the low level SHA1 calls when calculating the TPM 1.2 PCRssrc/evmctl.c+63 -150 replies
8/17Replace the low level HMAC calls when calculating the EVM HMACsrc/evmctl.c+32 -250 replies
9/17Add missing EVP_MD_CTX_free() call in calc_evm_hash()src/evmctl.c+39 -190 replies
10/17Disable use of OpenSSL "engine" supportconfigure.ac src/Makefile.am src/evmctl.c +2 more+42 -21 reply
11/17Fix potential use after free in read_tpm_banks()src/evmctl.c+1 -00 replies
12/17Limit the file hash algorithm name lengthsrc/evmctl.c+1 -10 replies
13/17Missing template data size lower bounds checkingsrc/evmctl.c+4 -00 replies
14/17Base sm2/sm3 test on openssl version installedtests/sign_verify.test+6 -30 replies
15/17Compile a newer version of OpenSSL.github/workflows/ci.yml .travis.yml+6 -61 reply
16/17Build OpenSSL without engine support.github/workflows/ci.yml .travis.yml build.sh +2 more+22 -50 replies
17/17Make sure the key file is a regular filesrc/libimaevm.c+12 -01 reply

Reviews trailers per patch

16 of 17 patches have a Reviewed-by or Acked-by.

PatchStefan BergerPetr VorelVitaly Chikunov
1/17R-b R-b R-b
2/17R-b R-b
3/17R-b
4/17R-b R-b
5/17R-b R-b
6/17R-b R-b
7/17R-b R-b
8/17R-b R-b
9/17R-b R-b
10/17R-b
11/17R-b R-b
12/17R-b R-b
13/17R-b R-b
14/17R-b
15/17R-b
16/17
17/17R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH ima-evm-utils v5 00/17] address deprecated warnings

Between travis/ci and OpenSSL v3 a large number of deprecated warnings are being emitted when compiling ima-evm-utils. Start addressing these deprecated warnings by replacing the low level SHA1 and HMAC calls with the EVP_ functions. IMA signature version 1 also uses low level calls, but instead of fixing it, deprecate it as nobody should be using it anyway.

OpenSSL v3 "engine" support is deprecated and replaced with "providers". Engine support will continue to work for a while, but results in deprecated declaration and other messages. Define a "--disable-engine" and the equivalent "--enable-engine=no" configuration option.

Changelog v5:
- Addressed Stefan's comments: add missing error message, update error message text, identifying SSL major version, and make sure other key files are regular files.
- Add missing sm2/sm3 "skipped" message.

Changelog v4:
Based on Vitaly's comments:
- instead of setting errno to zero, define a macro to log a message with the errno and reset errno.
- verify ENGINE_init symbol is defined in libcrypto.
- disable engine support if either OPENSSL_NO_DYNAMIC_ENGINE or OPENSSL_NO_ENGINE variables are defined.
- Rename CONFIG_ENGINE to CONFIG_IMA_EVM_ENGINE

Changelog v3:
- Make the SM2/SM3 tests dependent on the OpenSSL v3, rather than compiling OpenSSL v3, based on Vitaly's suggestion.
- Re-use the existing infrastructure for compiling OpenSSL to compile OpenSSL without engine support. ima-evm-utils compiles cleanly without any deprecated messages.
- Instead of using the distro OpenSSL version on jammy, compile OpenSSL to test building ima-evm-utils without OpenSSL engine support.
- Make sure the keyfile is a regular file before using it.
- Based on Vitaly's suggestion: undefine CONFIG_ENGINE when OpenSSL engine support is not configured, run the tests normally without checking whether engine support is configured.
- Add Stefan's Reviewed-by tags.

Changelog v2:
- Based on Vitaly's comments, base enabling engine support on OPENSSL_NO_ENGINE/OPENSSL_NO_DYNAMIC_ENGINE support. Also don't limit disabling ima-evm-utils engine support to v3, make it generic.
- Added Stefan's Reviewed-by tags.

Changelog v1:
- Based on Stefan's comments, removed deprecated functions when not used and added missing word. Updated the usage and options accordingly.
- Based on Vitaly's comments, explicitly require "--disable-engine" configuration to compile ima-evm-utils without OpenSSL v3 engine support and typo.
- Based on Petr's comments, addressed the "return 77" by removing it, updated the travis patch description, and added his Reviewed-by tags.

Mimi Zohar (17):
Revert "Reset 'errno' after failure to open or access a file" log and reset 'errno' after failure to open non-critical files Log and reset 'errno' on lsetxattr failure
travis: update dist=focal
Update configure.ac to address a couple of obsolete warnings Deprecate IMA signature version 1
Replace the low level SHA1 calls when calculating the TPM 1.2 PCRs Replace the low level HMAC calls when calculating the EVM HMAC Add missing EVP_MD_CTX_free() call in calc_evm_hash() Disable use of OpenSSL "engine" support
Fix potential use after free in read_tpm_banks()
Limit the file hash algorithm name length
Missing template data size lower bounds checking
Base sm2/sm3 test on openssl version installed
Compile a newer version of OpenSSL
Build OpenSSL without engine support
Make sure the key file is a regular file

 .github/workflows/ci.yml  |  10 +-
 .travis.yml               |  10 +-
 acinclude.m4              |   2 +-
 build.sh                  |   8 ++
 configure.ac              |  16 ++-
 m4/manpage-docbook-xsl.m4 |   2 +-
 src/Makefile.am           |  18 +++
 src/evmctl.c              | 287 ++++++++++++++++++++++++++------------
 src/imaevm.h              |   6 +
 src/libimaevm.c           |  45 ++++--
 tests/install-openssl3.sh |   9 +-
 tests/sign_verify.test    |  30 ++--
 12 files changed, 321 insertions(+), 122 deletions(-)
Signature · 1 line
2.31.1