Skip to contentSkip to conversation

Add test for CVE 2017-2636

PATCH New Martin Doucha 1 participant 1 message Aug 4, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add test for CVE 2017-2636

Fixes #498

---
 include/lapi/tty.h            |   4 ++
 runtest/cve                   |   1 +
 runtest/pty                   |   1 +
 testcases/kernel/pty/Makefile |   4 +-
 testcases/kernel/pty/pty05.c  | 107 ++++++++++++++++++++++++++++++++++
 5 files changed, 115 insertions(+), 2 deletions(-)
 create mode 100644 testcases/kernel/pty/pty05.c
include/lapi/tty.h +4 -0
index 353a103f1..6122145f3 100644
@@ -10,6 +10,10 @@
 # include <linux/tty.h>
 #endif
 
+#ifndef N_HDLC
+# define N_HDLC 13
+#endif
+
 #ifndef N_SLCAN
 # define N_SLCAN		17	/* Serial / USB serial CAN Adaptors */
 #endif
runtest/cve +1 -0
index fdb455af1..fa37ed38e 100644
@@ -17,6 +17,7 @@ cve-2016-9604 keyctl08
 cve-2016-9793 setsockopt04
 cve-2016-10044 cve-2016-10044
 cve-2017-2618 cve-2017-2618
+cve-2017-2636 pty05
 cve-2017-2671 cve-2017-2671
 cve-2017-6951 request_key05
 cve-2017-7308 setsockopt02
runtest/pty +1 -0
index 5587312d3..a43b18f2d 100644
@@ -3,6 +3,7 @@ pty01 pty01
 pty02 pty02
 pty03 pty03
 pty04 pty04
+pty05 pty05
 ptem01 ptem01
 hangup01 hangup01
 
testcases/kernel/pty/Makefile +2 -2
index 4469775aa..87d70ac1d 100644
@@ -24,7 +24,7 @@ top_srcdir		?= ../../..
 
 include $(top_srcdir)/include/mk/testcases.mk
 
-pty03: CFLAGS += -pthread
-pty03: LDLIBS += -lrt
+pty03 pty05: CFLAGS += -pthread
+pty03 pty05: LDLIBS += -lrt
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/pty/pty05.c new file +107 -0

107 lines not on this page · raw message

Signature · 1 line
2.27.0