// https://syzkaller.appspot.com/bug?id=f4887d4676b9d78faf6b619688ac71441c4dc33c // 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[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); long res = 0; *(uint32_t*)0x20000100 = 0xc; *(uint32_t*)0x20000104 = 0xe; *(uint64_t*)0x20000108 = 0x20000000; memcpy((void*)0x20000000, "\xb7\x02\x00\x00\x13\x00\x00\x00\xbf\xa3\x00\x00\x00\x00\x00\x00\x07" "\x03\x00\x00\x00\xfe\xff\xff\x7a\x0a\xf0\xff\xf8\xff\xff\xff\x79\xa4" "\xf0\xff\x00\x00\x00\x00\xb7\x06\x00\x00\xff\xff\xff\xff\x2d\x64\x05" "\x00\x00\x00\x00\x00\x65\x04\x04\x00\x01\x00\x00\x00\x04\x04\x00\x00" "\x01\x00\x00\x00\xb7\x03\x00\x00\x00\x00\x00\x00\x6a\x0a\x00\xfe\x00" "\x00\x00\x00\x85\x00\x00\x00\x2b\x00\x00\x00\xb7\x00\x00\x00\x00\x00" "\x00\x00\x95\x00\x00\x00\x00\x00\x00\x00", 112); *(uint64_t*)0x20000110 = 0x200000c0; memcpy((void*)0x200000c0, "syzkaller", 10); *(uint32_t*)0x20000118 = 0; *(uint32_t*)0x2000011c = 0; *(uint64_t*)0x20000120 = 0; *(uint32_t*)0x20000128 = 0; *(uint32_t*)0x2000012c = 0; *(uint8_t*)0x20000130 = 0; *(uint8_t*)0x20000131 = 0; *(uint8_t*)0x20000132 = 0; *(uint8_t*)0x20000133 = 0; *(uint8_t*)0x20000134 = 0; *(uint8_t*)0x20000135 = 0; *(uint8_t*)0x20000136 = 0; *(uint8_t*)0x20000137 = 0; *(uint8_t*)0x20000138 = 0; *(uint8_t*)0x20000139 = 0; *(uint8_t*)0x2000013a = 0; *(uint8_t*)0x2000013b = 0; *(uint8_t*)0x2000013c = 0; *(uint8_t*)0x2000013d = 0; *(uint8_t*)0x2000013e = 0; *(uint8_t*)0x2000013f = 0; *(uint32_t*)0x20000140 = 0; *(uint32_t*)0x20000144 = 0; res = syscall(__NR_bpf, 5, 0x20000100, 0x48); if (res != -1) r[0] = res; *(uint32_t*)0x20000280 = r[0]; *(uint32_t*)0x20000284 = 0; *(uint32_t*)0x20000288 = 0xe; *(uint32_t*)0x2000028c = 0x1000; *(uint64_t*)0x20000290 = 0x200001c0; memcpy((void*)0x200001c0, "\xe8\x43\x73\xf4\x60\xe0\xf1\x1c\x39\xf9\xb7\xa3\x1b\xa2", 14); *(uint64_t*)0x20000298 = 0x20000500; *(uint32_t*)0x200002a0 = 0x22; *(uint32_t*)0x200002a4 = 0; syscall(__NR_bpf, 0xa, 0x20000280, 0x28); return 0; }