Add test for CVE 2018-7566
PATCH 1/1 Add test for CVE 2018-7566
Fixes #606
---
There are two reproducers for this CVE:
- ioctl()/ioctl() race
- ioctl()/write() race
I've implemented the first one because it reliably crashes SLE-12SP3 GM kernel. The other reproducer gets stuck in one of the syscalls but I couldn't get it to trigger an actual crash. Should I implement the other one as well?
runtest/cve | 1 + testcases/kernel/sound/.gitignore | 1 + testcases/kernel/sound/Makefile | 2 + testcases/kernel/sound/snd_seq01.c | 107 +++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 testcases/kernel/sound/snd_seq01.c
runtest/cve +1 -0
@@ -40,6 +40,7 @@ cve-2017-17053 cve-2017-17053 cve-2017-18075 pcrypt_aead01 cve-2017-1000380 snd_timer01 cve-2018-5803 sctp_big_chunk +cve-2018-7566 snd_seq01 cve-2018-1000001 realpath01 cve-2018-1000199 ptrace08 cve-2018-1000204 ioctl_sg01
testcases/kernel/sound/.gitignore +1 -0
@@ -1 +1,2 @@ snd_timer01 +/snd_seq01
testcases/kernel/sound/Makefile +2 -0
@@ -8,5 +8,7 @@ CPPFLAGS += -D_GNU_SOURCE snd_timer01: CFLAGS+=-pthread snd_timer01: LDLIBS+=-lrt +snd_seq01: CFLAGS += -pthread +snd_seq01: LDLIBS += -lrt include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/sound/snd_seq01.c new file +107 -0
107 lines not on this page · raw message
Signature · 1 line
2.26.0
PATCH 1/1 Add test for CVE 2018-7566
Hi!
Quoted 1 line
Fixes #606
Add your signed-off-by here and pushed, thanks.
Quoted 9 lines
---
There are two reproducers for this CVE:
- ioctl()/ioctl() race
- ioctl()/write() raceI've implemented the first one because it reliably crashes SLE-12SP3 GM kernel. The other reproducer gets stuck in one of the syscalls but I couldn't get it to trigger an actual crash. Should I implement the other one as well?
Yes please, stuck tests is easy to detect as well, moreover the behavior of these tests is unpredictable anyways so we cannot really tell what will happen when the bug is triggered.
Signature · 2 lines
Cyril Hrubis [email protected]