Skip to contentSkip to conversation

syscalls/accept02: add CVE-2017-8890 test case

PATCH New Christian Amann 2 participants 2 messages Jun 3, 2019 – Jun 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscalls/accept02: add CVE-2017-8890 test case

In Kernels prior to 4.10.15 missing commit 657831ff the multicast group of a socket was copied over to a new socket created using the accept() syscall. This leads to a double free when closing both those sockets.

This can only be checked once a new socket was created which has to be closed eventually. That means that this test case can cause an unstable system if it does not succeed.

---
 runtest/syscalls                            |   2 +
 testcases/kernel/syscalls/accept/.gitignore |   1 +
 testcases/kernel/syscalls/accept/Makefile   |   2 +
 testcases/kernel/syscalls/accept/accept02.c | 143 ++++++++++++++++++++++++++++
 4 files changed, 148 insertions(+)
 create mode 100644 testcases/kernel/syscalls/accept/accept02.c
runtest/syscalls +2 -0
index 762b15b1f..79ef294fe 100644
@@ -2,6 +2,8 @@
 abort01 abort01
 
 accept01 accept01
+accept02 accept02
+
 accept4_01 accept4_01
 
 access01 access01
testcases/kernel/syscalls/accept/.gitignore +1 -0
index 1f6f8ada0..5b1462699 100644
@@ -1 +1,2 @@
 /accept01
+/accept02
testcases/kernel/syscalls/accept/Makefile +2 -0
index bd617d806..0910871c7 100644
@@ -21,3 +21,5 @@ top_srcdir		?= ../../../..
 include $(top_srcdir)/include/mk/testcases.mk
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
+
+accept02: CFLAGS += -pthread
testcases/kernel/syscalls/accept/accept02.c new file +143 -0

143 lines not on this page · raw message

Signature · 1 line
2.16.4