aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/test
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-09-27 16:02:43 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-09-27 14:18:05 +0000
commit440b26ec58c1da582a1b614a476a4b5f3abf43d0 (patch)
treeebda3164cb8e2d168e0c029faf27942bf9203fdd /sys/linux/test
parent2fd13b4d7c0a65ab26933e97ffad53e6c27fa739 (diff)
sys/linux/test: add ELF binary seed
Add a seed that creates and execs something that resembles an ELF binary.
Diffstat (limited to 'sys/linux/test')
-rw-r--r--sys/linux/test/execve_elf5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/linux/test/execve_elf b/sys/linux/test/execve_elf
new file mode 100644
index 000000000..71607fb23
--- /dev/null
+++ b/sys/linux/test/execve_elf
@@ -0,0 +1,5 @@
+r0 = syz_create_resource$binfmt(&AUTO='./file0\x00')
+r1 = openat$binfmt(0xffffffffffffff9c, r0, 0x42, 0x1ff)
+write$binfmt_elf64(r1, &AUTO={{AUTO, AUTO, AUTO, AUTO, 0x2, 0x1, 0x1, 0x3, 0x0, 0x2, 0x3e, 0x1, 0x100, 0x40, 0x200, 0x0, 0x40, AUTO, AUTO, 0x40, 0x2, 0x1}, [{0x1, 0x0, 0x0, 0x10000, 0x150, 0x10, 0x1000, 0x0}, {0x1, 0x0, 0x0, 0x20000, 0x200, 0x0, 0x2000, 0x10}, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}], ""/0x1000, ["", "", ""]}, AUTO)
+close(r1)
+execveat$binfmt(0xffffffffffffff9c, r0, &AUTO={[], 0x0}, &AUTO={[], 0x0}, 0x0)