Skip to contentSkip to conversation

syscalls/keyctl06: new test for keyring_read() buffer overrun

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

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/4 syscalls/keyctl06: new test for keyring_read() buffer overrun

From: Eric Biggers <[email protected]>

Add a test for a bug which caused the kernel to write past the end of the provided buffer when using KEYCTL_READ to read from a keyring.

---
 runtest/syscalls                            |  1 +
 testcases/kernel/syscalls/.gitignore        |  1 +
 testcases/kernel/syscalls/keyctl/keyctl06.c | 68 +++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+)
 create mode 100644 testcases/kernel/syscalls/keyctl/keyctl06.c
runtest/syscalls +1 -0
index b1e988dce..fc6800abf 100644
@@ -502,6 +502,7 @@ keyctl02 keyctl02
 keyctl03 keyctl03
 keyctl04 keyctl04
 keyctl05 keyctl05
+keyctl06 keyctl06
 
 kcmp01 kcmp01
 kcmp02 kcmp02
testcases/kernel/syscalls/.gitignore +1 -0
index 4dc2f8bfa..a803986ef 100644
@@ -463,6 +463,7 @@
 /keyctl/keyctl03
 /keyctl/keyctl04
 /keyctl/keyctl05
+/keyctl/keyctl06
 /kcmp/kcmp01
 /kcmp/kcmp02
 /kcmp/kcmp03
testcases/kernel/syscalls/keyctl/keyctl06.c new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
2.15.0.rc0.271.g36b669edcc-goog