Skip to contentSkip to conversation

Add N_HDLC constant to lapi/tty.h

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

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 Add N_HDLC constant to lapi/tty.h

---

Changes since v1:
- patch split off from the CVE test

 include/lapi/tty.h | 4 ++++
 1 file changed, 4 insertions(+)
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
Signature · 1 line
2.27.0
#1 lore raw

PATCH v2 2/2 Add test for CVE 2017-2636

Fixes #498

---

Changes since v2:
- LAPI changes split off to separate patch
- added forgotten .gitignore entry

Sorry about resubmitting so quickly.

 runtest/cve                     |   1 +
 runtest/pty                     |   1 +
 testcases/kernel/pty/.gitignore |   1 +
 testcases/kernel/pty/Makefile   |   4 +-
 testcases/kernel/pty/pty05.c    | 107 ++++++++++++++++++++++++++++++++
 5 files changed, 112 insertions(+), 2 deletions(-)
 create mode 100644 testcases/kernel/pty/pty05.c
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/.gitignore +1 -0
index c67d723d2..7f1048483 100644
@@ -4,3 +4,4 @@
 /pty02
 /pty03
 /pty04
+/pty05
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