// https://syzkaller.appspot.com/bug?id=ca1ad9f9ca56859c900da9078c4f9b5b94bba9fa // 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[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x3ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x400000000000ul, /*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=*/0x400001000000ul, /*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*)0x4000000000c0 = 0; *(uint32_t*)0x4000000000c4 = 0xc; *(uint64_t*)0x4000000000c8 = 0x400000000440; memcpy( (void*)0x400000000440, "\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\x00" "\x00\x00\x0f\x00\x00\x00\x18\x01\x00\x00\x64\x6c\x6c\x25\x00\x00\x00\x00" "\x00\x00\x00\x00\x7b\x1a\xf8\xff\x00\x00\x00\x00\xbf\xa1\x00\x00\x00\x00" "\x00\x00\x07\x01\x00\x00\xf8\xff\xff\xff\xb7\x02\x00\x00\x08\x00\x00\x00" "\xb7\x03\x00\x00\x00\x00\x00\x00\x85\x00\x00\x00\x06\x00\x00\x00\x95", 89); *(uint64_t*)0x4000000000d0 = 0; *(uint32_t*)0x4000000000d8 = 0; *(uint32_t*)0x4000000000dc = 0; *(uint64_t*)0x4000000000e0 = 0; *(uint32_t*)0x4000000000e8 = 0; *(uint32_t*)0x4000000000ec = 0; memset((void*)0x4000000000f0, 0, 16); *(uint32_t*)0x400000000100 = 0; *(uint32_t*)0x400000000104 = 0; *(uint32_t*)0x400000000108 = -1; *(uint32_t*)0x40000000010c = 0; *(uint64_t*)0x400000000110 = 0; *(uint32_t*)0x400000000118 = 0; *(uint32_t*)0x40000000011c = 0; *(uint64_t*)0x400000000120 = 0; *(uint32_t*)0x400000000128 = 0; *(uint32_t*)0x40000000012c = 0; *(uint32_t*)0x400000000130 = -1; *(uint32_t*)0x400000000134 = 0; *(uint64_t*)0x400000000138 = 0; *(uint64_t*)0x400000000140 = 0; *(uint32_t*)0x400000000148 = 0; *(uint32_t*)0x40000000014c = 0; *(uint32_t*)0x400000000150 = 0; syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x4000000000c0ul, /*size=*/0x94ul); *(uint32_t*)0x4000000000c0 = 0xb; *(uint32_t*)0x4000000000c4 = 8; *(uint32_t*)0x4000000000c8 = 0xc; *(uint32_t*)0x4000000000cc = 0x6f4; *(uint32_t*)0x4000000000d0 = 1; *(uint32_t*)0x4000000000d4 = 1; *(uint32_t*)0x4000000000d8 = 0; memset((void*)0x4000000000dc, 0, 16); *(uint32_t*)0x4000000000ec = 0; *(uint32_t*)0x4000000000f0 = -1; *(uint32_t*)0x4000000000f4 = 0; *(uint32_t*)0x4000000000f8 = 0; *(uint32_t*)0x4000000000fc = 0; *(uint64_t*)0x400000000100 = 0; *(uint32_t*)0x400000000108 = 0; *(uint32_t*)0x40000000010c = 0; res = syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0x4000000000c0ul, /*size=*/0x48ul); if (res != -1) r[0] = res; *(uint32_t*)0x4000000000c0 = 0; *(uint32_t*)0x4000000000c4 = 0xc; *(uint64_t*)0x4000000000c8 = 0x400000000440; memcpy((void*)0x400000000440, "\x18\x00\x00\x00\x00\x00\x8b\xd6\x00\x00\x00\x00\x00\x00\x00\x00\x18" "\x11\x00\x00", 20); *(uint32_t*)0x400000000454 = r[0]; memcpy((void*)0x400000000458, "\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\x03\x00", 62); *(uint64_t*)0x4000000000d0 = 0; *(uint32_t*)0x4000000000d8 = 0; *(uint32_t*)0x4000000000dc = 0; *(uint64_t*)0x4000000000e0 = 0; *(uint32_t*)0x4000000000e8 = 0; *(uint32_t*)0x4000000000ec = 0; memset((void*)0x4000000000f0, 0, 16); *(uint32_t*)0x400000000100 = 0; *(uint32_t*)0x400000000104 = 0; *(uint32_t*)0x400000000108 = -1; *(uint32_t*)0x40000000010c = 0; *(uint64_t*)0x400000000110 = 0; *(uint32_t*)0x400000000118 = 0; *(uint32_t*)0x40000000011c = 0; *(uint64_t*)0x400000000120 = 0; *(uint32_t*)0x400000000128 = 0; *(uint32_t*)0x40000000012c = 0; *(uint32_t*)0x400000000130 = 0; *(uint32_t*)0x400000000134 = 0; *(uint64_t*)0x400000000138 = 0; *(uint64_t*)0x400000000140 = 0; *(uint32_t*)0x400000000148 = 0; *(uint32_t*)0x40000000014c = 0; *(uint32_t*)0x400000000150 = 0; syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x4000000000c0ul, /*size=*/0x94ul); *(uint32_t*)0x4000000000c0 = 0x11; *(uint32_t*)0x4000000000c4 = 0xc; *(uint64_t*)0x4000000000c8 = 0x400000000440; *(uint64_t*)0x4000000000d0 = 0x400000000240; memcpy((void*)0x400000000240, "GPL\000", 4); *(uint32_t*)0x4000000000d8 = 0; *(uint32_t*)0x4000000000dc = 0; *(uint64_t*)0x4000000000e0 = 0; *(uint32_t*)0x4000000000e8 = 0; *(uint32_t*)0x4000000000ec = 0; memset((void*)0x4000000000f0, 0, 16); *(uint32_t*)0x400000000100 = 0; *(uint32_t*)0x400000000104 = 0; *(uint32_t*)0x400000000108 = -1; *(uint32_t*)0x40000000010c = 0; *(uint64_t*)0x400000000110 = 0; *(uint32_t*)0x400000000118 = 0; *(uint32_t*)0x40000000011c = 0; *(uint64_t*)0x400000000120 = 0; *(uint32_t*)0x400000000128 = 0; *(uint32_t*)0x40000000012c = 0; *(uint32_t*)0x400000000130 = 0; *(uint32_t*)0x400000000134 = 0; *(uint64_t*)0x400000000138 = 0; *(uint64_t*)0x400000000140 = 0; *(uint32_t*)0x400000000148 = 0; *(uint32_t*)0x40000000014c = 0; *(uint32_t*)0x400000000150 = 0; res = syscall(__NR_bpf, /*cmd=*/5ul, /*arg=*/0x4000000000c0ul, /*size=*/0x90ul); if (res != -1) r[1] = res; *(uint64_t*)0x4000000004c0 = 0x4000000002c0; memcpy((void*)0x4000000002c0, "mm_page_alloc\000", 14); *(uint32_t*)0x4000000004c8 = r[1]; *(uint32_t*)0x4000000004cc = 0; *(uint64_t*)0x4000000004d0 = 0; syscall(__NR_bpf, /*cmd=*/0x11ul, /*arg=*/0x4000000004c0ul, /*size=*/0x10ul); *(uint32_t*)0x400000000300 = 0xb; *(uint32_t*)0x400000000304 = 0x100; *(uint32_t*)0x400000000308 = 0xfd; *(uint32_t*)0x40000000030c = 9; *(uint32_t*)0x400000000310 = 1; *(uint32_t*)0x400000000314 = 1; *(uint32_t*)0x400000000318 = 0; memset((void*)0x40000000031c, 0, 16); *(uint32_t*)0x40000000032c = 0; *(uint32_t*)0x400000000330 = -1; *(uint32_t*)0x400000000334 = 0; *(uint32_t*)0x400000000338 = 0; *(uint32_t*)0x40000000033c = 0; *(uint64_t*)0x400000000340 = 0; *(uint32_t*)0x400000000348 = 0; *(uint32_t*)0x40000000034c = 0; res = syscall(__NR_bpf, /*cmd=*/0ul, /*arg=*/0x400000000300ul, /*size=*/0x50ul); if (res != -1) r[2] = res; *(uint64_t*)0x400000000000 = 0; *(uint64_t*)0x400000000008 = 0; *(uint64_t*)0x400000000010 = 0x400000000000; *(uint64_t*)0x400000000018 = 0x400000000000; *(uint32_t*)0x400000000020 = 0xcff5; *(uint32_t*)0x400000000024 = r[2]; *(uint64_t*)0x400000000028 = 0; *(uint64_t*)0x400000000030 = 0; syscall(__NR_bpf, /*cmd=*/0x1aul, /*arg=*/0x400000000000ul, /*size=*/0x38ul); return 0; }