Message ID | 20190221053026.18489-5-ebiggers@kernel.org (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Series | ltp: AF_ALG test helpers and a few regression tests | expand |
Hi Eric, you forget to add af_alg03 into runtest/cve. The same applies to af_alg0{4,5}. Kind regards, Petr
Hi Petr, On Fri, Mar 15, 2019 at 10:29:53AM +0100, Petr Vorel wrote: > Hi Eric, > > you forget to add af_alg03 into runtest/cve. > The same applies to af_alg0{4,5}. > > > Kind regards, > Petr As far as I know, there are no CVEs assigned for those bugs. - Eric
Hi Eric, > > you forget to add af_alg03 into runtest/cve. > > The same applies to af_alg0{4,5}. > As far as I know, there are no CVEs assigned for those bugs. Wouldn't be better to add them to runtest/cve (or other runtest file) just with filename? And rename them in runtest file once the CVEs are assigned? > - Eric Kind regards, Petr
On Fri, Mar 15, 2019 at 07:40:18PM +0100, Petr Vorel wrote: > Hi Eric, > > > > you forget to add af_alg03 into runtest/cve. > > > The same applies to af_alg0{4,5}. > > > As far as I know, there are no CVEs assigned for those bugs. > Wouldn't be better to add them to runtest/cve (or other runtest file) just with > filename? And rename them in runtest file once the CVEs are assigned? > > > - Eric > > Kind regards, > Petr Oh, I missed that they're not in any runtest file at all. They all should be in runtest/crypto (in addition to the ones with CVEs being in runtest/cve). - Eric
diff --git a/testcases/kernel/crypto/.gitignore b/testcases/kernel/crypto/.gitignore index dc79f3275b..3e7936fc94 100644 --- a/testcases/kernel/crypto/.gitignore +++ b/testcases/kernel/crypto/.gitignore @@ -1,4 +1,5 @@ af_alg01 af_alg02 +af_alg03 pcrypt_aead01 crypto_user01 diff --git a/testcases/kernel/crypto/af_alg03.c b/testcases/kernel/crypto/af_alg03.c new file mode 100644 index 0000000000..240c52835f --- /dev/null +++ b/testcases/kernel/crypto/af_alg03.c @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright 2019 Google LLC + */ + +/* + * Regression test for commit e57121d08c38 ("crypto: chacha20poly1305 - validate + * the digest size"). This test verifies that the rfc7539 template can't be + * instantiated with a hash algorithm whose digest size is not 16 bytes. + */ + +#include "tst_test.h" +#include "tst_af_alg.h" + +static void run(void) +{ + tst_require_alg("aead", "rfc7539(chacha20,poly1305)"); + tst_require_alg("hash", "sha256"); + + if (tst_have_alg("aead", "rfc7539(chacha20,sha256)")) { + tst_res(TFAIL, + "instantiated rfc7539 template with wrong digest size"); + } else { + tst_res(TPASS, + "couldn't instantiate rfc7539 template with wrong digest size"); + } +} + +static struct tst_test test = { + .test_all = run, +};