Skip to contentSkip to conversation

Add test for CVE-2019-8912

PATCH New Martin Doucha 3 participants 4 messages Aug 6, 2020 – Aug 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add test for CVE-2019-8912

Fixes #504

---
 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
index be8bc81d2..446559efc 100644
@@ -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
index fdb455af1..dff08396f 100644
@@ -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
index c5be01180..448f986a6 100644
@@ -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
index 7cbdb72d1..8175a346a 100644
@@ -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
#1 lore raw

PATCH 1/1 Add test for CVE-2019-8912

Quoted 4 lines · Martin Doucha

Fixes #504

---

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
#2 lore raw

PATCH 1/1 Add test for CVE-2019-8912

In reply to Martin Doucha

----- Original Message -----

Quoted 11 lines

Fixes #504

---
 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