1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# Tests for binfmt_misc.
# Executor setups binfmt_misc with ./file0 interpreter for files with byte 0x01 at offset 0.
r3 = syz_create_resource$binfmt(&AUTO='./file1\x00')
execveat$binfmt(0xffffffffffffff9c, r3, &AUTO={[], 0x0}, &AUTO={[], 0x0}, 0x0) # ENOENT
r0 = openat$binfmt(0xffffffffffffff9c, r3, 0x42, 0x1ff)
close(r0)
execveat$binfmt(0xffffffffffffff9c, r3, &AUTO={[], 0x0}, &AUTO={[], 0x0}, 0x0) # ENOEXEC
r1 = openat$binfmt(0xffffffffffffff9c, r3, 0x2, 0x0)
write(r1, &AUTO="01010101", 0x4)
close(r1)
execveat$binfmt(0xffffffffffffff9c, r3, &AUTO={[], 0x0}, &AUTO={[], 0x0}, 0x0) # ENOENT
r2 = openat(0xffffffffffffff9c, &AUTO='./file0\x00', 0x42, 0x0)
close(r2)
execveat$binfmt(0xffffffffffffff9c, r3, &AUTO={[], 0x0}, &AUTO={[], 0x0}, 0x0) # EACCES
fchmodat(0xffffffffffffff9c, &AUTO='./file0\x00', 0x1ff)
execveat$binfmt(0xffffffffffffff9c, r3, &AUTO={[], 0x0}, &AUTO={[], 0x0}, 0x0) # ENOEXEC
|