github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/sys/linux/test/binfmt (about)

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