// https://syzkaller.appspot.com/bug?id=efa6839876f93dc8739c11e445b9375a969ad06e // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_futex #define __NR_futex 98 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif 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; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // futex arguments: [ // addr: nil // op: futex_op = 0x84 (8 bytes) // val: int32 = 0x0 (4 bytes) // timeout: nil // addr2: nil // val3: int32 = 0x0 (4 bytes) // ] syscall(__NR_futex, /*addr=*/0ul, /*op=FUTEX_PRIVATE_FLAG|FUTEX_CMP_REQUEUE*/ 0x84ul, /*val=*/0, /*timeout=*/0ul, /*addr2=*/0ul, /*val3=*/0); return 0; }