// https://syzkaller.appspot.com/bug?id=3c525eb32f20839275e11b8935ad6f72d0041141 // 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, 0x20000000, 0x1000000, 3, 0x32, -1, 0); intptr_t res = 0; res = syscall(__NR_socket, 2, 1, 0); if (res != -1) r[0] = res; *(uint16_t*)0x20e5b000 = 2; *(uint16_t*)0x20e5b002 = htobe16(0x4e20); *(uint32_t*)0x20e5b004 = htobe32(0xe0000001); syscall(__NR_bind, r[0], 0x20e5b000, 0x10); *(uint16_t*)0x20ccb000 = 2; *(uint16_t*)0x20ccb002 = htobe16(0x4e20); *(uint32_t*)0x20ccb004 = htobe32(0); syscall(__NR_connect, r[0], 0x20ccb000, 0x10); *(uint32_t*)0x20000100 = 1; *(uint32_t*)0x20000104 = 3; *(uint64_t*)0x20000108 = 0x20000200; memcpy((void*)0x20000200, "\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\xff\x95" "\x00\x00\x00\x00\x00\x00\x00\x17\x39\xf4\x86\xa0\xef\x06\x3f\x58\xe5" "\x7c\x4f\x3c\x16\x79\x72\xfc\x54\x89\xa4\xef\x75\xc6\x02\x0d\x44\x7d" "\x9d\x00\x79\x70\xd5\x2b\xaf\xd9\xc4\x36\x5d\xde\x7f\x3b\xbf\xcb\x81" "\x29\xa6\xef\x0b\xa5\x16\xb4\xf0\x02\xe9\xe6\x7e\xf9\x7a\x90\x29\xfd" "\x33\x69\x49\xc2\xab\xa9\xc7\x4e\x66\xb8\x80\x08\x4c\x49\xdc\x9d\x06" "\x54\xd6\x53\x80\x94\xd2\x6a\x9e\xac\xb2\xae\x39\x23\x3f\x04\x94\xa8" "\x4b\xee\x05\x43\x8a\xfb\x2c\x0c\x71\x0c\xda\xee\x6d\x16\x39\xc8\xa4" "\x6f\x7f\x20\x16\x19\x53\xd4\x12\x00\x20\x48\xbf\x8f\x11\x7b\x05\x4e" "\x35\xb2\x49\xbd\xca\x00\x0c\x81\xd6\xdd\xd9\x03\xa3\x08\x34\x06\xd3" "\x74\x6b\x10\xdd\x81\x84\xa3\x1d", 178); *(uint64_t*)0x20000110 = 0x202bf000; memcpy((void*)0x202bf000, "syzkaller\000", 10); *(uint32_t*)0x20000118 = 4; *(uint32_t*)0x2000011c = 0x436; *(uint64_t*)0x20000120 = 0x20000040; *(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; *(uint32_t*)0x20000148 = -1; *(uint32_t*)0x2000014c = 8; *(uint64_t*)0x20000150 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000158 = 0; *(uint32_t*)0x2000015c = 0x10; *(uint64_t*)0x20000160 = 0x20000000; *(uint32_t*)0x20000000 = 0; *(uint32_t*)0x20000004 = 0; *(uint32_t*)0x20000008 = 0; *(uint32_t*)0x2000000c = 0; *(uint32_t*)0x20000168 = 0; res = syscall(__NR_bpf, 5, 0x20000100, 0x48); if (res != -1) r[1] = res; res = syscall(__NR_socket, 0x29, 0x1000000000002, 0); if (res != -1) r[2] = res; *(uint32_t*)0x2031aff8 = r[0]; *(uint32_t*)0x2031affc = r[1]; syscall(__NR_ioctl, r[2], 0x89e0, 0x2031aff8); *(uint32_t*)0x20000180 = r[0]; *(uint32_t*)0x20000184 = r[1]; syscall(__NR_ioctl, r[2], 0x89e0, 0x20000180); return 0; }