// https://syzkaller.appspot.com/bug?id=40e898b7c790a47631994276feed76d807316040 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_fanotify_init #define __NR_fanotify_init 262 #endif #ifndef __NR_ioctl #define __NR_ioctl 29 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // fanotify_init arguments: [ // flags: fanotify_flags = 0x200 (8 bytes) // events: fanotify_events = 0x0 (8 bytes) // ] // returns fd_fanotify res = syscall(__NR_fanotify_init, /*flags=*/0x200ul, /*events=*/0ul); if (res != -1) r[0] = res; // ioctl$sock_qrtr_TIOCINQ arguments: [ // fd: sock_qrtr (resource) // cmd: const = 0x541b (4 bytes) // arg: nil // ] syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x541b, /*arg=*/0ul); return 0; }