// https://syzkaller.appspot.com/bug?id=566325c29e627765e4f5d223163e5c15191f0f46 // autogenerated by syzkaller (http://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #define BITMASK_LEN(type, bf_len) (type)((1ull << (bf_len)) - 1) #define BITMASK_LEN_OFF(type, bf_off, bf_len) \ (type)(BITMASK_LEN(type, (bf_len)) << (bf_off)) #define STORE_BY_BITMASK(type, addr, val, bf_off, bf_len) \ if ((bf_off) == 0 && (bf_len) == 0) { \ *(type*)(addr) = (type)(val); \ } else { \ type new_val = *(type*)(addr); \ new_val &= ~BITMASK_LEN_OFF(type, (bf_off), (bf_len)); \ new_val |= ((type)(val)&BITMASK_LEN(type, (bf_len))) << (bf_off); \ *(type*)(addr) = new_val; \ } uint64_t r[1] = {0xffffffffffffffff}; void loop() { long res = 0; res = syscall(__NR_socket, 0xa, 2, 0); if (res != -1) r[0] = res; *(uint16_t*)0x2000cfe4 = 0xa; *(uint16_t*)0x2000cfe6 = htobe16(0x4e20); *(uint32_t*)0x2000cfe8 = 0; *(uint8_t*)0x2000cfec = 0; *(uint8_t*)0x2000cfed = 0; *(uint8_t*)0x2000cfee = 0; *(uint8_t*)0x2000cfef = 0; *(uint8_t*)0x2000cff0 = 0; *(uint8_t*)0x2000cff1 = 0; *(uint8_t*)0x2000cff2 = 0; *(uint8_t*)0x2000cff3 = 0; *(uint8_t*)0x2000cff4 = 0; *(uint8_t*)0x2000cff5 = 0; *(uint8_t*)0x2000cff6 = 0; *(uint8_t*)0x2000cff7 = 0; *(uint8_t*)0x2000cff8 = 0; *(uint8_t*)0x2000cff9 = 0; *(uint8_t*)0x2000cffa = 0; *(uint8_t*)0x2000cffb = 0; *(uint32_t*)0x2000cffc = 0; syscall(__NR_connect, r[0], 0x2000cfe4, 0x1c); *(uint64_t*)0x200000c0 = 0; *(uint32_t*)0x200000c8 = 0; *(uint64_t*)0x200000d0 = 0x20000ff0; *(uint64_t*)0x200000d8 = 0; *(uint64_t*)0x200000e0 = 0x20000000; *(uint64_t*)0x200000e8 = 0; *(uint32_t*)0x200000f0 = 0; syscall(__NR_sendmsg, r[0], 0x200000c0, 0xc100); memcpy((void*)0x200001c0, "\x13\xb9\xd8\x4b\xb6\xc7", 6); *(uint8_t*)0x200001c6 = 0; *(uint8_t*)0x200001c7 = 0; *(uint8_t*)0x200001c8 = 0; *(uint8_t*)0x200001c9 = 0; *(uint8_t*)0x200001ca = 0; *(uint8_t*)0x200001cb = 0; *(uint16_t*)0x200001cc = htobe16(0xd); STORE_BY_BITMASK(uint32_t, 0x200001ce, 0, 0, 29); STORE_BY_BITMASK(uint32_t, 0x200001ce, 0, 29, 1); STORE_BY_BITMASK(uint32_t, 0x200001ce, 0, 30, 1); STORE_BY_BITMASK(uint32_t, 0x200001ce, 0, 31, 1); *(uint8_t*)0x200001d2 = 0; *(uint8_t*)0x200001d3 = 0; *(uint8_t*)0x200001d4 = 0; *(uint8_t*)0x200001d5 = 0; memcpy((void*)0x200001d6, "\xe3\x60\x99\xaa\x1e\x3a\xd1\x5f\xe6\x86\x08\xa8\x1a\xdc\x85\x57\x3d" "\xcd\xff\xd0\xe1\x38\xf1\x2c\xd2\x5d\x0f\x32\xf6\x94\xb4\xeb\x5f\xa7" "\x09\x38\x65\xfc\xbf\xb5\x58\x33\x06\xdf\xd5\x8e\x88\xd1\xc9\x64\x56" "\x70\x2d\x23\x02\x4b\x8a\xd5\xb3\x1e\x36\x4f\x62\x59", 64); *(uint32_t*)0x20000240 = 0; *(uint32_t*)0x20000244 = 0; *(uint32_t*)0x20000248 = 0; *(uint32_t*)0x2000024c = 0; *(uint32_t*)0x20000250 = 0; *(uint32_t*)0x20000254 = 0; *(uint64_t*)0x20000440 = 0; *(uint32_t*)0x20000448 = 0; *(uint64_t*)0x20000450 = 0x20002ff0; *(uint64_t*)0x20002ff0 = 0x20000040; memcpy((void*)0x20000040, "\xbc\xe5", 2); *(uint64_t*)0x20002ff8 = 2; *(uint64_t*)0x20000458 = 1; *(uint64_t*)0x20000460 = 0x2000ae80; *(uint64_t*)0x20000468 = 0; *(uint32_t*)0x20000470 = 0; syscall(__NR_sendmsg, r[0], 0x20000440, 0); } int main() { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); loop(); return 0; }