// https://syzkaller.appspot.com/bug?id=ff1dfeb44166b1c0918460c3a7edae536e0a1aba // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_bpf #define __NR_bpf 321 #endif uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-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=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } *(uint32_t*)0x20000180 = 0x1e; *(uint32_t*)0x20000184 = 0; *(uint32_t*)0x20000188 = -1; *(uint32_t*)0x2000018c = 7; *(uint32_t*)0x20000190 = 0; *(uint32_t*)0x20000194 = 1; *(uint32_t*)0x20000198 = 0xc; memset((void*)0x2000019c, 0, 16); *(uint32_t*)0x200001ac = 0; *(uint32_t*)0x200001b0 = -1; *(uint32_t*)0x200001b4 = 0; *(uint32_t*)0x200001b8 = 0; *(uint32_t*)0x200001bc = 0; *(uint64_t*)0x200001c0 = 0; res = syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0x20000180ul, /*size=*/0x48ul); if (res != -1) r[0] = res; *(uint32_t*)0x20000a40 = 3; *(uint32_t*)0x20000a44 = 0xc; *(uint64_t*)0x20000a48 = 0x20000440; memcpy((void*)0x20000440, "\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18" "\x11\x00\x00", 20); *(uint32_t*)0x20000454 = r[0]; memcpy((void*)0x20000458, "\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x08\x00\x00\x00\x00\x00\x00\x7b" "\x8a\xf8\xff\x00\x00\x00\x00\xbf\xa2\x00\x00\x00\x00\x00\x00\x07\x02" "\x00\x00\xf8\xff\xff\xff\xb7\x03\x00\x00\x08\x00\x00\x00\xb7\x04\x00" "\x00\x00\x00\x00\x00\x85\x00\x00\x00\x59\x00\x00\x00\x95", 65); *(uint64_t*)0x20000a50 = 0; *(uint32_t*)0x20000a58 = 0; *(uint32_t*)0x20000a5c = 0; *(uint64_t*)0x20000a60 = 0; *(uint32_t*)0x20000a68 = 0; *(uint32_t*)0x20000a6c = 0; memset((void*)0x20000a70, 0, 16); *(uint32_t*)0x20000a80 = 0; *(uint32_t*)0x20000a84 = 0x25; *(uint32_t*)0x20000a88 = -1; *(uint32_t*)0x20000a8c = 8; *(uint64_t*)0x20000a90 = 0; *(uint32_t*)0x20000a98 = 0; *(uint32_t*)0x20000a9c = 0x10; *(uint64_t*)0x20000aa0 = 0; *(uint32_t*)0x20000aa8 = 0; *(uint32_t*)0x20000aac = 0; *(uint32_t*)0x20000ab0 = 0; *(uint32_t*)0x20000ab4 = 0; *(uint64_t*)0x20000ab8 = 0; *(uint64_t*)0x20000ac0 = 0; *(uint32_t*)0x20000ac8 = 0x10; *(uint32_t*)0x20000acc = 0; syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x20000a40ul, /*size=*/0x90ul); *(uint32_t*)0x200000c0 = 0x16; *(uint32_t*)0x200000c4 = 0xc; *(uint64_t*)0x200000c8 = 0x20000440; *(uint64_t*)0x200000d0 = 0x20000000; memcpy((void*)0x20000000, "syzkaller\000", 10); *(uint32_t*)0x200000d8 = 0; *(uint32_t*)0x200000dc = 0; *(uint64_t*)0x200000e0 = 0; *(uint32_t*)0x200000e8 = 0; *(uint32_t*)0x200000ec = 0; memset((void*)0x200000f0, 0, 16); *(uint32_t*)0x20000100 = 0; *(uint32_t*)0x20000104 = 0; *(uint32_t*)0x20000108 = -1; *(uint32_t*)0x2000010c = 0; *(uint64_t*)0x20000110 = 0; *(uint32_t*)0x20000118 = 0; *(uint32_t*)0x2000011c = 0; *(uint64_t*)0x20000120 = 0; *(uint32_t*)0x20000128 = 0; *(uint32_t*)0x2000012c = 0; *(uint32_t*)0x20000130 = 0; *(uint32_t*)0x20000134 = 0; *(uint64_t*)0x20000138 = 0; *(uint64_t*)0x20000140 = 0; *(uint32_t*)0x20000148 = 0; *(uint32_t*)0x2000014c = 0; res = syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x200000c0ul, /*size=*/0x90ul); if (res != -1) r[1] = res; *(uint32_t*)0x20000180 = r[1]; *(uint32_t*)0x20000184 = 0x2000000; *(uint32_t*)0x20000188 = 0xe; *(uint32_t*)0x2000018c = 0; *(uint64_t*)0x20000190 = 0x200005c0; memcpy((void*)0x200005c0, "\x63\xec\xed\xae\x46\xdc\x76\x34\xcb\x41\xc9\xf7\xb9\x43", 14); *(uint64_t*)0x20000198 = 0; *(uint32_t*)0x200001a0 = 0; *(uint32_t*)0x200001a4 = 0; *(uint32_t*)0x200001a8 = 0; *(uint32_t*)0x200001ac = 0; *(uint64_t*)0x200001b0 = 0; *(uint64_t*)0x200001b8 = 0; *(uint32_t*)0x200001c0 = 0; *(uint32_t*)0x200001c4 = 0; *(uint32_t*)0x200001c8 = 0; syscall(__NR_bpf, /*cmd=*/0xaul, /*arg=*/0x20000180ul, /*size=*/0x50ul); return 0; }