crypto/af_alg06: new regression test for setting malformed authenc key
PATCH 1/1 crypto/af_alg06: new regression test for setting malformed authenc key
From: Eric Biggers <[email protected]>
Test for a bug where the kernel crashed if a malformed key was set on an instance of the "authenc" crypto algorithm.
Signed-off-by Eric Biggers <[email protected]>
--- runtest/crypto | 1 + testcases/kernel/crypto/.gitignore | 1 + testcases/kernel/crypto/af_alg06.c | 50 ++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 testcases/kernel/crypto/af_alg06.c
runtest/crypto +1 -0
@@ -3,5 +3,6 @@ af_alg02 af_alg02 af_alg03 af_alg03 af_alg04 af_alg04 af_alg05 af_alg05 +af_alg06 af_alg06 pcrypt_aead01 pcrypt_aead01 crypto_user01 crypto_user01
testcases/kernel/crypto/.gitignore +1 -0
@@ -3,5 +3,6 @@ af_alg02 af_alg03 af_alg04 af_alg05 +af_alg06 pcrypt_aead01 crypto_user01
testcases/kernel/crypto/af_alg06.c new file +50 -0
50 lines not on this page · raw message
Signature · 1 line
2.21.0.593.g511ec345e18-goog
PATCH 1/1 crypto/af_alg06: new regression test for setting malformed authenc key
Hi Eric,
testcases/kernel/crypto/af_alg06.c line 38
Quoted 3 lines
testcases/kernel/crypto/af_alg06.c new file +3
-0+tst_res (TINFO , +"Setting malformed authenc key. May crash buggy kernels." ); +TEST (setsockopt (algfd,SOL_ALG ,ALG_SET_KEY , &key,sizeof (key)));
While test itself works nicely (crashes 4.20 kernel), there were still some old distros issues - missing SOL_ALG [1].
Thus pushed with added lapi/socket.h include.
Kind regards,
Petr