// https://syzkaller.appspot.com/bug?id=6e3498c3650f67e221e4bac37aef281e32371351 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_waitid #define __NR_waitid 95 #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)) { } // mmap arguments: [ // addr: VMA[0x3000] // len: len = 0x3000 (8 bytes) // prot: mmap_prot = 0x0 (8 bytes) // flags: mmap_flags = 0x2172 (8 bytes) // fd: fd (resource) // offset: intptr = 0x0 (8 bytes) // ] syscall( __NR_mmap, /*addr=*/0x20003000ul, /*len=*/0x3000ul, /*prot=*/0ul, /*flags=MAP_LOCKED|MAP_GROWSDOWN|MAP_FIXED|MAP_ANONYMOUS|0x42*/ 0x2172ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); // waitid arguments: [ // which: waitid_which = 0x0 (8 bytes) // pid: pid (resource) // infop: ptr[out, siginfo] { // siginfo { // signo: int32 = 0x0 (4 bytes) // errno: int32 = 0x0 (4 bytes) // code: int32 = 0x0 (4 bytes) // pad = 0x0 (116 bytes) // } // } // options: wait_options = 0x0 (8 bytes) // ru: nil // ] syscall(__NR_waitid, /*which=*/0ul, /*pid=*/0, /*infop=*/0x20002ff9ul, /*options=*/0ul, /*ru=*/0ul); return 0; }