Bugzilla – Bug 1226463
algif_hash in kernel-obs-build causes an openssl-1_1 test failure
Last modified: 2024-07-15 08:25:09 UTC
Created attachment 875539 [details] diff of lsinitrd From https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:K/openssl-1_1/standard/x86_64 : > [ 248s] ../test/recipes/30-test_afalg.t (Wstat: 256 (exited 1) Tests: 1 Failed: 1) Comparing /proc/modules in the build VM shows: +algif_hash 12288 0 - Live 0x0000000000000000 (E) +af_alg 36864 1 algif_hash, Live 0x0000000000000000 (E) So apparently, algif_hash brings af_alg and that for some unknown reason breaks the test. If I rm algif_hash from KERNEL_MODULES, it works again.
It was introduced in: commit bfd7db420f2993e1228e6413ab3e6d6033ff73db Refs: Author: Fabian Vogt <fvogt@suse.de> AuthorDate: Tue Apr 19 15:01:49 2022 +0200 Commit: Fabian Vogt <fvogt@suse.de> CommitDate: Wed Jun 12 11:17:48 2024 +0200 rpm/kernel-obs-build.spec.in: Include algif_hash, aegis128 and xts modules
Without the module loaded: # INFO: @ test/afalgtest.c:133 # Can't load AFALG engine 1..0 # Skipped: ./test/afalgtest With the module loaded: # Subtest: test_afalg_aes_cbc 1..3 ALG_PERR: engines/e_afalg.c(383): Failed to bind socket : No such file or directory # ERROR: (bool) 'EVP_CipherInit_ex(ctx, cipher, e, key, iv, 1) == true' fail ed @ test/afalgtest.c:73 # false # 139906561836864:error:80065067:lib(128):afalg_create_sk:socket bind failed :engines/e_afalg.c:384: not ok 1 - iteration 1 ALG_PERR: engines/e_afalg.c(383): Failed to bind socket : No such file or directory # ERROR: (bool) 'EVP_CipherInit_ex(ctx, cipher, e, key, iv, 1) == true' fail ed @ test/afalgtest.c:73 # false # 139906561836864:error:80065067:lib(128):afalg_create_sk:socket bind failed :engines/e_afalg.c:384: not ok 2 - iteration 2 ALG_PERR: engines/e_afalg.c(383): Failed to bind socket : No such file or directory # ERROR: (bool) 'EVP_CipherInit_ex(ctx, cipher, e, key, iv, 1) == true' fail ed @ test/afalgtest.c:73 # false # 139906561836864:error:80065067:lib(128):afalg_create_sk:socket bind failed :engines/e_afalg.c:384: not ok 3 - iteration 3 not ok 1 - test_afalg_aes_cbc ok 2 - test_pr16743 And according to strace: 23186 bind(3, {sa_family=AF_ALG, salg_type="skcipher", salg_feat=0, salg_mask=0, salg_name="cbc(aes)"}, 88) = -1 ENOENT (No such file or directory) So apparently cbc(aes) is needed for the test, if afalg is available. We likely need to disable that test in openssl. For the time being, I am dropping algif_hash from KERNEL_MODULES.
Some notes: When the build fails, "osc shell" and then: 1) either: cd rpmbuild/BUILD/openssl-1.1.1w LD_LIBRARY_PATH=`pwd` make test -j1 TESTS=test_afalg 2) or: cd rpmbuild/BUILD/openssl-1.1.1w LD_LIBRARY_PATH=`pwd` OPENSSL_ENGINES=`pwd`/engines ./test/afalgtest
Any updates here?
Apparently if af_alg is available, openssl tries to test various algorithms, even those not actually available. IMO an openssl bug.