* af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')!
@ 2024-09-24 9:46 Naresh Kamboju
2024-09-24 11:23 ` Naresh Kamboju
2024-09-24 13:30 ` Herbert Xu
0 siblings, 2 replies; 4+ messages in thread
From: Naresh Kamboju @ 2024-09-24 9:46 UTC (permalink / raw)
To: LTP List, open list, Linux Crypto Mailing List, lkft-triage
Cc: David S. Miller, Herbert Xu, Anders Roxell, Dan Carpenter,
Arnd Bergmann, chrubis
The following LTP crypto tests failed on Linus mainline master branch.
LTP
ltp-crypto:
* af_alg03
* af_alg01
First seen on e8fc317dfca9 (v6.11-2185-ge8fc317dfca9)
Good: v6.11-rc7
BAD: e8fc317dfca9 (v6.11-2185-ge8fc317dfca9) and (v6.11)
Devices and qemu's:
- dragonboard-410c
- dragonboard-845c
- e850-96
- juno-r2
- arm64
- qemu-arm64
- qemu-armv7
- qemu-riscv64
- qemu-x86_64
- rk3399-rock-pi-4b
- x15
- x86_64
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Warning log:
----------
tst_test.c:1617: TINFO: Timeout per run is 0h 02m 30s
af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')!
tst_af_alg.c:46: TBROK: unexpected error binding AF_ALG socket to hash
algorithm 'hmac(hmac(md5))': EINVAL (22)
HINT: You _MAY_ be missing kernel fixes:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af3ff8045bbf
HINT: You _MAY_ be vulnerable to CVE(s):
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-17806
HINT: You _MAY_ be missing kernel fixes:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af3ff8045bbf
HINT: You _MAY_ be vulnerable to CVE(s):
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-17806
...
tst_test.c:1617: TINFO: Timeout per run is 0h 02m 30s
af_alg03.c:22: TFAIL: instantiated rfc7539 template with wrong digest size
HINT: You _MAY_ be missing kernel fixes:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e57121d08c38
boot Log links,
--------
- https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.11-8836-gf8eb5bd9a818/testrun/25191971/suite/ltp-crypto/test/af_alg03/log
- https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/2m983y1hatxwkXBtrAYvCPw6pK2
Test results history:
----------
- https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.11-8836-gf8eb5bd9a818/testrun/25191971/suite/ltp-crypto/test/af_alg01/history/
- https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.11-8836-gf8eb5bd9a818/testrun/25191971/suite/ltp-crypto/test/af_alg01/history/
metadata:
----
git describe: v6.11-2185-ge8fc317dfca9 .. v6.11-5002-g200289db261f
git repo: https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline
git sha: abf2050f51fdca0fd146388f83cddd95a57a008d (v6.11)
kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2m980TaGzPk0qjtFUPnMNoDj7Sw/config
build url: https://storage.tuxsuite.com/public/linaro/lkft/builds/2m980TaGzPk0qjtFUPnMNoDj7Sw/
toolchain: gcc-13
Steps to reproduce:
---------
- https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/2m983y1hatxwkXBtrAYvCPw6pK2/reproducer
- https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/2m983y1hatxwkXBtrAYvCPw6pK2/tux_plan
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')! 2024-09-24 9:46 af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')! Naresh Kamboju @ 2024-09-24 11:23 ` Naresh Kamboju 2024-09-24 13:30 ` Herbert Xu 1 sibling, 0 replies; 4+ messages in thread From: Naresh Kamboju @ 2024-09-24 11:23 UTC (permalink / raw) To: LTP List, open list, Linux Crypto Mailing List, lkft-triage Cc: David S. Miller, Herbert Xu, Anders Roxell, Dan Carpenter, Arnd Bergmann, chrubis On Tue, 24 Sept 2024 at 15:16, Naresh Kamboju <naresh.kamboju@linaro.org> wrote: > > The following LTP crypto tests failed on Linus mainline master branch. > > LTP > ltp-crypto: > * af_alg03 > * af_alg01 > > First seen on e8fc317dfca9 (v6.11-2185-ge8fc317dfca9) > Good: v6.11-rc7 > BAD: e8fc317dfca9 (v6.11-2185-ge8fc317dfca9) and (v6.11) Also seen on Linux next from next-20240909 tag. Good: next-20240906 Bad: next-20240909 > > Devices and qemu's: > - dragonboard-410c > - dragonboard-845c > - e850-96 > - juno-r2 > - arm64 > - qemu-arm64 > - qemu-armv7 > - qemu-riscv64 > - qemu-x86_64 > - rk3399-rock-pi-4b > - x15 > - x86_64 > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > > Warning log: > ---------- > tst_test.c:1617: TINFO: Timeout per run is 0h 02m 30s > af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')! > tst_af_alg.c:46: TBROK: unexpected error binding AF_ALG socket to hash > algorithm 'hmac(hmac(md5))': EINVAL (22) > > HINT: You _MAY_ be missing kernel fixes: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af3ff8045bbf > > HINT: You _MAY_ be vulnerable to CVE(s): > > https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-17806 > > HINT: You _MAY_ be missing kernel fixes: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=af3ff8045bbf > > HINT: You _MAY_ be vulnerable to CVE(s): > > https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-17806 > > ... > tst_test.c:1617: TINFO: Timeout per run is 0h 02m 30s > af_alg03.c:22: TFAIL: instantiated rfc7539 template with wrong digest size > > HINT: You _MAY_ be missing kernel fixes: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e57121d08c38 > > > boot Log links, > -------- > - https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.11-8836-gf8eb5bd9a818/testrun/25191971/suite/ltp-crypto/test/af_alg03/log > - https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/2m983y1hatxwkXBtrAYvCPw6pK2 > > Test results history: > ---------- > - https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.11-8836-gf8eb5bd9a818/testrun/25191971/suite/ltp-crypto/test/af_alg01/history/ > - https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.11-8836-gf8eb5bd9a818/testrun/25191971/suite/ltp-crypto/test/af_alg01/history/ > > metadata: > ---- > git describe: v6.11-2185-ge8fc317dfca9 .. v6.11-5002-g200289db261f > git repo: https://gitlab.com/Linaro/lkft/mirrors/torvalds/linux-mainline > git sha: abf2050f51fdca0fd146388f83cddd95a57a008d (v6.11) > kernel config: > https://storage.tuxsuite.com/public/linaro/lkft/builds/2m980TaGzPk0qjtFUPnMNoDj7Sw/config > build url: https://storage.tuxsuite.com/public/linaro/lkft/builds/2m980TaGzPk0qjtFUPnMNoDj7Sw/ > toolchain: gcc-13 > > Steps to reproduce: > --------- > - https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/2m983y1hatxwkXBtrAYvCPw6pK2/reproducer > - https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/tests/2m983y1hatxwkXBtrAYvCPw6pK2/tux_plan > > -- > Linaro LKFT > https://lkft.linaro.org - Naresh ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')! 2024-09-24 9:46 af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')! Naresh Kamboju 2024-09-24 11:23 ` Naresh Kamboju @ 2024-09-24 13:30 ` Herbert Xu 2024-09-24 22:28 ` Eric Biggers 1 sibling, 1 reply; 4+ messages in thread From: Herbert Xu @ 2024-09-24 13:30 UTC (permalink / raw) To: Naresh Kamboju Cc: LTP List, open list, Linux Crypto Mailing List, lkft-triage, David S. Miller, Anders Roxell, Dan Carpenter, Arnd Bergmann, chrubis On Tue, Sep 24, 2024 at 03:16:09PM +0530, Naresh Kamboju wrote: > > Warning log: > ---------- > tst_test.c:1617: TINFO: Timeout per run is 0h 02m 30s > af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')! > tst_af_alg.c:46: TBROK: unexpected error binding AF_ALG socket to hash > algorithm 'hmac(hmac(md5))': EINVAL (22) This is expected. You need to fix the test to not treat this as an error. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')! 2024-09-24 13:30 ` Herbert Xu @ 2024-09-24 22:28 ` Eric Biggers 0 siblings, 0 replies; 4+ messages in thread From: Eric Biggers @ 2024-09-24 22:28 UTC (permalink / raw) To: Herbert Xu Cc: Naresh Kamboju, LTP List, open list, Linux Crypto Mailing List, lkft-triage, David S. Miller, Anders Roxell, Dan Carpenter, Arnd Bergmann, chrubis On Tue, Sep 24, 2024 at 09:30:39PM +0800, Herbert Xu wrote: > On Tue, Sep 24, 2024 at 03:16:09PM +0530, Naresh Kamboju wrote: > > > > Warning log: > > ---------- > > tst_test.c:1617: TINFO: Timeout per run is 0h 02m 30s > > af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')! > > tst_af_alg.c:46: TBROK: unexpected error binding AF_ALG socket to hash > > algorithm 'hmac(hmac(md5))': EINVAL (22) > > This is expected. You need to fix the test to not treat this as an > error. > So the error code changed from ENOENT to EINVAL. These particular LTP tests (af_alg01 and af_alg03) could check for either ENOENT or EINVAL, and it would preserve the main point of the tests. I do feel that the previous error code, ENOENT, was more logical though. From userspace's perspective, these invalid algorithms don't exist and don't need to be treated any different from other algorithms that don't exist. Has it been checked what else in userspace might need to be updated as a result of this change? Looking at libkcapi for example (https://github.com/smuellerDD/libkcapi/blob/master/lib/kcapi.h#L125) it passes the error code up and documents it as part of its API: * @return 0 upon success; * -ENOENT - algorithm not available; * -EOPNOTSUPP - AF_ALG family not available; * -EINVAL - accept syscall failed * -ENOMEM - cipher handle cannot be allocated */ int kcapi_cipher_init(struct kcapi_handle **handle, const char *ciphername, uint32_t flags); So that is now wrong, as "algorithm not available" can now be either ENOENT or EINVAL. I don't really see the reason for this churn. The kernel commit which made this change (795f85fca229) provides no explanation either. - Eric ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-24 22:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-24 9:46 af_alg01.c:36: TFAIL: instantiated nested hmac algorithm ('hmac(hmac(md5))')! Naresh Kamboju
2024-09-24 11:23 ` Naresh Kamboju
2024-09-24 13:30 ` Herbert Xu
2024-09-24 22:28 ` Eric Biggers
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox