Add test for CVE-2019-8912
PATCH 1/1 Add test for CVE-2019-8912
Fixes #504
Signed-off-by Martin Doucha <[email protected]>
--- runtest/crypto | 1 + runtest/cve | 1 + testcases/kernel/crypto/.gitignore | 1 + testcases/kernel/crypto/Makefile | 4 +- testcases/kernel/crypto/af_alg07.c | 117 +++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 testcases/kernel/crypto/af_alg07.c
runtest/crypto +1 -0
@@ -4,6 +4,7 @@ af_alg03 af_alg03 af_alg04 af_alg04 af_alg05 af_alg05 af_alg06 af_alg06 +af_alg07 af_alg07 pcrypt_aead01 pcrypt_aead01 crypto_user01 crypto_user01 crypto_user02 crypto_user02
runtest/cve +1 -0
@@ -53,5 +53,6 @@ cve-2018-1000199 ptrace08 cve-2018-1000204 ioctl_sg01 cve-2018-18559 bind06 cve-2018-19854 crypto_user01 +cve-2019-8912 af_alg07 cve-2020-11494 pty04 cve-2020-14416 pty03
testcases/kernel/crypto/.gitignore +1 -0
@@ -4,6 +4,7 @@ af_alg03 af_alg04 af_alg05 af_alg06 +af_alg07 pcrypt_aead01 crypto_user01 crypto_user02
testcases/kernel/crypto/Makefile +2 -2
@@ -21,6 +21,6 @@ CFLAGS += -D_GNU_SOURCE include $(top_srcdir)/include/mk/generic_leaf_target.mk -af_alg02: CFLAGS += -pthread +af_alg02 af_alg07: CFLAGS += -pthread -crypto_user02: LDLIBS += -lrt +af_alg07 crypto_user02: LDLIBS += -lrt
testcases/kernel/crypto/af_alg07.c new file +117 -0
117 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH 1/1 Add test for CVE-2019-8912
Quoted 4 lines · Martin Doucha
Fixes #504
Signed-off-by Martin Doucha <[email protected]>---
I forgot to mention here that it'd be great to verify this reproducer using KASAN. The bug should be present in vanilla kernels up until 4.20.10. If you have one of those with KASAN enabled, please check that af_alg07 will trigger use-after-free error in sockfs_setattr(). Example KASAN backtrace:
https://patchwork.ozlabs.org/project/netdev/patch/[email protected]/
Signature · 7 lines
Martin Doucha [email protected] QA Engineer for Software Maintenance SUSE LINUX, s.r.o. CORSO IIa Krizikova 148/34 186 00 Prague 8 Czech Republic
PATCH 1/1 Add test for CVE-2019-8912
In reply to Martin Doucha----- Original Message -----
Quoted 11 lines
Fixes #504
Signed-off-by Martin Doucha <[email protected]>--- runtest/crypto | 1 + runtest/cve | 1 + testcases/kernel/crypto/.gitignore | 1 + testcases/kernel/crypto/Makefile | 4 +- testcases/kernel/crypto/af_alg07.c | 117 +++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 testcases/kernel/crypto/af_alg07.c
Acked-by Jan Stancek <[email protected]>
PATCH 1/1 Add test for CVE-2019-8912
In reply to Martin DouchaHi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]