Add test for CVE 2018-9568
PATCH v2 1/1 Add test for CVE 2018-9568
Fixes #438
---
Changes since v1:
- bind listen socket to any free port
runtest/cve | 1 + runtest/syscalls | 1 + testcases/kernel/syscalls/connect/.gitignore | 1 + testcases/kernel/syscalls/connect/connect02.c | 105 ++++++++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 testcases/kernel/syscalls/connect/connect02.c
runtest/cve +1 -0
@@ -41,6 +41,7 @@ cve-2017-18075 pcrypt_aead01 cve-2017-1000380 snd_timer01 cve-2018-5803 sctp_big_chunk cve-2018-7566 snd_seq01 +cve-2018-9568 connect02 cve-2018-1000001 realpath01 cve-2018-1000199 ptrace08 cve-2018-1000204 ioctl_sg01
runtest/syscalls +1 -0
@@ -121,6 +121,7 @@ close08 close08 confstr01 confstr01 connect01 connect01 +connect02 connect02 creat01 creat01 creat03 creat03
testcases/kernel/syscalls/connect/.gitignore +1 -0
@@ -1 +1,2 @@ /connect01 +/connect02
testcases/kernel/syscalls/connect/connect02.c new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
2.26.0
PATCH v2 1/1 Add test for CVE 2018-9568
Hi!
testcases/kernel/syscalls/connect/connect02.c line 1
Quoted 3 lines
+++
b/testcases/kernel/syscalls/connect/connect02.ctestcases/kernel/syscalls/connect/connect02.c new file +1
-0@@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-2.0
Unless the original reproducer is under GPL-2.0 the default should be GPL-2.0-or-later. I can change it before applying if it's OK to do so.
Also looking at spdx.org GPL-2.0 is not valid and it should be GPL-2.0-only.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v2 1/1 Add test for CVE 2018-9568
Quoted 7 lines · Cyril Hrubis
Hi!
testcases/kernel/syscalls/connect/connect02.c line 1
Quoted 3 lines
+++
b/testcases/kernel/syscalls/connect/connect02.ctestcases/kernel/syscalls/connect/connect02.c new file +1
-0@@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-2.0 Unless the original reproducer is under GPL-2.0 the default should be GPL-2.0-or-later. I can change it before applying if it's OK to do so.
Sorry, I copy-pasted the header from the ptrace08 test. This one should be GPL-2.0-or-later so please change it.
Quoted 2 lines
Also looking at spdx.org GPL-2.0 is not valid and it should be GPL-2.0-only.
I guess we should also ask Andrew Lutomirsky which licence to use in ptrace08 then.
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 v2 1/1 Add test for CVE 2018-9568
Hi!
Quoted 5 lines
Quoted 2 lines
Also looking at spdx.org GPL-2.0 is not valid and it should be GPL-2.0-only.
I guess we should also ask Andrew Lutomirsky which licence to use in ptrace08 then.
Older documentation seems to refer to it as GPL-2.0, as well as '+' was replaced with '-or-later' so I guess that they changed the identifier to GPL-2.0-only. And we do have a few GPL-2.0 so these should be replaced with GPL-2.0-only.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v2 1/1 Add test for CVE 2018-9568
In reply to Martin DouchaHi!
testcases/kernel/syscalls/connect/connect02.c line 57
Quoted 5 lines
testcases/kernel/syscalls/connect/connect02.c new file +5
-0+static void cleanup (void ) +{ +if (listenfd >=0 ) +SAFE_CLOSE (listenfd); +}
I've chnaged this to listenfd > 0, because if the first SAFE_CALL() in setup has failed we will close stdin here.
Corrected the licence and pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v2 1/1 Add test for CVE 2018-9568
In reply to Martin Douchafyi, some kernels may hit TBROK because commit b6f6118901d1 ("ipv6: restrict IPV6_ADDRFORM operation") broke IPV6_ADDRFORM:
https://lkml.org/lkml/2020/4/18/574