Skip to contentSkip to conversation

security/dirtyc0w: Add new test.

PATCH New Cyril Hrubis 1 participant 1 message Nov 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 security/dirtyc0w: Add new test.

Based on: https://github.com/dirtycow/dirtycow.github.io

---
 runtest/syscalls                                   |   1 +
 testcases/kernel/security/dirtyc0w/.gitignore      |   2 +
 testcases/kernel/security/dirtyc0w/Makefile        |  21 ++++
 testcases/kernel/security/dirtyc0w/dirtyc0w.c      | 112 +++++++++++++++++++
 .../kernel/security/dirtyc0w/dirtyc0w_child.c      | 121 +++++++++++++++++++++
 5 files changed, 257 insertions(+)
 create mode 100644 testcases/kernel/security/dirtyc0w/.gitignore
 create mode 100644 testcases/kernel/security/dirtyc0w/Makefile
 create mode 100644 testcases/kernel/security/dirtyc0w/dirtyc0w.c
 create mode 100644 testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
runtest/syscalls +1 -0
index b781241..7c84296 100644
@@ -804,6 +804,7 @@ process_vm_writev01 process_vm01 -w
 process_vm_writev02 process_vm_writev02
 
 prot_hsymlinks prot_hsymlinks
+dirtyc0w dirtyc0w
 
 pselect01 pselect01
 pselect01_64 pselect01_64
testcases/kernel/security/dirtyc0w/.gitignore new file +2 -0
new file mode 100644
index 0000000..7700d91
@@ -0,0 +1,2 @@
+dirtyc0w
+dirtyc0w_child
testcases/kernel/security/dirtyc0w/Makefile new file +21 -0
new file mode 100644
index 0000000..aef8a9a
@@ -0,0 +1,21 @@
+# Copyright (c) 2016 Linux Test Project
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+top_srcdir		?= ../../../..
+
+include $(top_srcdir)/include/mk/testcases.mk
+dirtyc0w_child: CFLAGS+=-pthread
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/security/dirtyc0w/dirtyc0w.c new file +112 -0

112 lines not on this page · raw message

testcases/kernel/security/dirtyc0w/dirtyc0w_child.c new file +121 -0

121 lines not on this page · raw message

Signature · 6 lines
2.7.3


-- 
Cyril Hrubis
[email protected]