// https://syzkaller.appspot.com/bug?id=9a8604f36e1b4961b247808632abc090e2903f86 // 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=*/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)) { } *(uint32_t*)0x200000000340 = 2; *(uint32_t*)0x200000000344 = 4; *(uint32_t*)0x200000000348 = 8; *(uint32_t*)0x20000000034c = 1; *(uint32_t*)0x200000000350 = 0x80; *(uint32_t*)0x200000000354 = -1; *(uint32_t*)0x200000000358 = 0; memset((void*)0x20000000035c, 0, 16); *(uint32_t*)0x20000000036c = 0; *(uint32_t*)0x200000000370 = -1; *(uint32_t*)0x200000000374 = 0; *(uint32_t*)0x200000000378 = 0; *(uint32_t*)0x20000000037c = 0; *(uint64_t*)0x200000000380 = 0; *(uint32_t*)0x200000000388 = 0; *(uint32_t*)0x20000000038c = 0; res = syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0x200000000340ul, /*size=*/0x50ul); if (res != -1) r[0] = res; memcpy((void*)0x200000000000, "\x1b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", 15); res = syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0x200000000000ul, /*size=*/0x48ul); if (res != -1) r[1] = res; *(uint32_t*)0x200000000840 = 7; *(uint32_t*)0x200000000844 = 0x1c; *(uint64_t*)0x200000000848 = 0x200000000d80; memcpy((void*)0x200000000d80, "\x18\x08\x00\x00\x80\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18" "\x11\x00\x00", 20); *(uint32_t*)0x200000000d94 = r[1]; memcpy((void*)0x200000000d98, "\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x02\x00\x00\x14\x00\x00\x00\xb7" "\x03\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x05\x00\x00\x00\xbc\xa9" "\x00\x00\x00\x00\x00\x00\x35\x09\x02\x00\x00\xd4\x4a\xff\xe5\x00\x0d" "\x00\x00\x00\x00\x00\xb7\x02\x00\x00\x00\x00\x00\x00\x73\x9a\xf0\xff" "\x00\x00\x00\x00\xc5\x09\x04\x00\x04\x10\x00\x00\xc3\xaa\xf0\xff\x00" "\x00\x00\x00\xbf\x86\x00\x00\x00\x00\x00\x00\x07\x08\x00\x00\xf8\xff" "\xff\xff\xbf\xa4\x00\x00\x00\x00\x00\x00\x07\x06\x00\x00\xf0\xff\xff" "\xff\xb7\x02\x00\x00\x08\x00\x00\x00\x18\x22\x00\x00", 132); *(uint32_t*)0x200000000e1c = r[0]; memcpy((void*)0x200000000e20, "\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x05\x00\x00\x08\x00\x00\x00\x46" "\x08\xf0\xff\x76\x00\x00\x00\xbf\x98\x00\x00\x00\x00\x00\x00\x56\x08" "\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x07\x00\x00\x00\xb7\x00\x00" "\x00\x00\x00\x00\x00\x95", 57); *(uint64_t*)0x200000000850 = 0x200000000980; memcpy((void*)0x200000000980, "GPL\000", 4); *(uint32_t*)0x200000000858 = 0; *(uint32_t*)0x20000000085c = 0; *(uint64_t*)0x200000000860 = 0; *(uint32_t*)0x200000000868 = 0x41100; *(uint32_t*)0x20000000086c = 0; memset((void*)0x200000000870, 0, 16); *(uint32_t*)0x200000000880 = 0; *(uint32_t*)0x200000000884 = 0; *(uint32_t*)0x200000000888 = -1; *(uint32_t*)0x20000000088c = 0; *(uint64_t*)0x200000000890 = 0; *(uint32_t*)0x200000000898 = 0; *(uint32_t*)0x20000000089c = 0; *(uint64_t*)0x2000000008a0 = 0; *(uint32_t*)0x2000000008a8 = 0; *(uint32_t*)0x2000000008ac = 0; *(uint32_t*)0x2000000008b0 = 0; *(uint32_t*)0x2000000008b4 = 0; *(uint64_t*)0x2000000008b8 = 0; *(uint64_t*)0x2000000008c0 = 0; *(uint32_t*)0x2000000008c8 = 0; *(uint32_t*)0x2000000008cc = 0; *(uint32_t*)0x2000000008d0 = 0; syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x200000000840ul, /*size=*/0x94ul); return 0; }