// https://syzkaller.appspot.com/bug?id=8e030beda49b8e549cfeb17ed369414ed27331e6 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*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=*/0x200001000000ul, /*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)) { } // mmap$auto arguments: [ // addr: intptr = 0x0 (8 bytes) // len: intptr = 0x4020009 (8 bytes) // prot: intptr = 0x6 (8 bytes) // flags: intptr = 0xeb1 (8 bytes) // fd: fd (resource) // off: intptr = 0x8000 (8 bytes) // ] syscall(__NR_mmap, /*addr=*/0ul, /*len=*/0x4020009ul, /*prot=*/6ul, /*flags=*/0xeb1ul, /*fd=*/0x401, /*off=*/0x8000ul); // madvise$auto arguments: [ // start: intptr = 0x0 (8 bytes) // len_in: intptr = 0xffffffffffff0001 (8 bytes) // behavior: int32 = 0x15 (4 bytes) // ] syscall(__NR_madvise, /*start=*/0ul, /*len_in=*/0xffffffffffff0001ul, /*behavior=*/0x15); // openat$auto_proc_pid_maps_operations_internal arguments: [ // fd: const = 0xffffffffffffff9c (8 bytes) // file: ptr[in, buffer] { // buffer: {2f 70 72 6f 63 2f 73 65 6c 66 2f 6d 61 70 73 00} (length // 0x10) // } // flags: open_flags = 0x1a1000 (4 bytes) // mode: const = 0x0 (2 bytes) // ] // returns fd_proc_pid_maps_operations_internal memcpy((void*)0x200000000040, "/proc/self/maps\000", 16); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x200000000040ul, /*flags=O_SYNC|O_NOFOLLOW|O_CLOEXEC*/ 0x1a1000, /*mode=*/0); if (res != -1) r[0] = res; // ioctl$auto_PROCMAP_QUERY arguments: [ // fd: fd_proc_pid_maps_operations_internal (resource) // cmd: const = 0xc0686611 (4 bytes) // arg: ptr[inout, procmap_query$auto] { // procmap_query$auto { // size: int64 = 0x67 (8 bytes) // query_flags: int64 = 0x0 (8 bytes) // query_addr: int64 = 0x7fff (8 bytes) // vma_start: int64 = 0x5 (8 bytes) // vma_end: int64 = 0x80000000007 (8 bytes) // vma_flags: int64 = 0x1 (8 bytes) // vma_page_size: int64 = 0x80000001 (8 bytes) // vma_offset: int64 = 0xff (8 bytes) // inode: int64 = 0x5 (8 bytes) // dev_major: int32 = 0x7 (4 bytes) // dev_minor: int32 = 0xfbfffffe (4 bytes) // vma_name_size: int32 = 0x5 (4 bytes) // build_id_size: int32 = 0x7fb (4 bytes) // vma_name_addr: int64 = 0x7 (8 bytes) // build_id_addr: int64 = 0x9 (8 bytes) // } // } // ] *(uint64_t*)0x200000000080 = 0x67; *(uint64_t*)0x200000000088 = 0; *(uint64_t*)0x200000000090 = 0x7fff; *(uint64_t*)0x200000000098 = 5; *(uint64_t*)0x2000000000a0 = 0x80000000007; *(uint64_t*)0x2000000000a8 = 1; *(uint64_t*)0x2000000000b0 = 0x80000001; *(uint64_t*)0x2000000000b8 = 0xff; *(uint64_t*)0x2000000000c0 = 5; *(uint32_t*)0x2000000000c8 = 7; *(uint32_t*)0x2000000000cc = 0xfbfffffe; *(uint32_t*)0x2000000000d0 = 5; *(uint32_t*)0x2000000000d4 = 0x7fb; *(uint64_t*)0x2000000000d8 = 7; *(uint64_t*)0x2000000000e0 = 9; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0xc0686611, /*arg=*/0x200000000080ul); return 0; }