Skip to contentSkip to conversation

syscalls/keyctl05: new test for key_update() crash

PATCH New Eric Biggers 1 participant 1 message Aug 1, 2017 Keys/keyrings

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 syscalls/keyctl05: new test for key_update() crash

From: Eric Biggers <[email protected]>

Add a test for a kernel bug that caused a key type's ->free_preparse() method to be called on an uninitialized key_preparsed_payload, potentially causing a NULL pointer dereference or other kernel crash.

---
 runtest/syscalls                            |   1 +
 testcases/kernel/syscalls/.gitignore        |   1 +
 testcases/kernel/syscalls/keyctl/keyctl05.c | 230 ++++++++++++++++++++++++++++
 3 files changed, 232 insertions(+)
 create mode 100644 testcases/kernel/syscalls/keyctl/keyctl05.c
runtest/syscalls +1 -0
index 5c7fd8e94..cfc1cbfa1 100644
@@ -495,6 +495,7 @@ keyctl01 keyctl01
 keyctl02 keyctl02
 keyctl03 keyctl03
 keyctl04 keyctl04
+keyctl05 keyctl05
 
 kcmp01 kcmp01
 kcmp02 kcmp02
testcases/kernel/syscalls/.gitignore +1 -0
index e311ba3f8..82dfb8293 100644
@@ -458,6 +458,7 @@
 /keyctl/keyctl02
 /keyctl/keyctl03
 /keyctl/keyctl04
+/keyctl/keyctl05
 /kcmp/kcmp01
 /kcmp/kcmp02
 /kcmp/kcmp03
testcases/kernel/syscalls/keyctl/keyctl05.c new file +229 -0

229 lines not on this page · raw message

Signature · 1 line
2.14.0.rc0.400.g1c36432dff-goog