Skip to contentSkip to conversation

syscalls/keyctl07: new test for oops when reading negative key

PATCH Superseded Eric Biggers 1 participant 1 message Oct 10, 2017 Keys/keyrings

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 syscalls/keyctl07: new test for oops when reading negative key

From: Eric Biggers <[email protected]>

Add a test for a bug which caused the kernel to dereference a bogus pointer when using KEYCTL_READ to read from a negative key.

---
 runtest/syscalls                            |  1 +
 testcases/kernel/syscalls/.gitignore        |  1 +
 testcases/kernel/syscalls/keyctl/keyctl07.c | 89 +++++++++++++++++++++++++++++
 3 files changed, 91 insertions(+)
 create mode 100644 testcases/kernel/syscalls/keyctl/keyctl07.c
runtest/syscalls +1 -0
index 67a7362ee..649dbfa6c 100644
@@ -501,6 +501,7 @@ keyctl03 keyctl03
 keyctl04 keyctl04
 keyctl05 keyctl05
 keyctl06 keyctl06
+keyctl07 keyctl07
 
 kcmp01 kcmp01
 kcmp02 kcmp02
testcases/kernel/syscalls/.gitignore +1 -0
index 1e573d9a4..53ad7ca2b 100644
@@ -463,6 +463,7 @@
 /keyctl/keyctl04
 /keyctl/keyctl05
 /keyctl/keyctl06
+/keyctl/keyctl07
 /kcmp/kcmp01
 /kcmp/kcmp02
 /kcmp/kcmp03
testcases/kernel/syscalls/keyctl/keyctl07.c new file +89 -0

89 lines not on this page · raw message

Signature · 1 line
2.14.2.920.gcf0c67979c-goog