// https://syzkaller.appspot.com/bug?id=4418e3d8aea63d756dce642b94a0ec3987cb8220 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #define BITMASK(bf_off, bf_len) (((1ull << (bf_len)) - 1) << (bf_off)) #define STORE_BY_BITMASK(type, htobe, addr, val, bf_off, bf_len) \ *(type*)(addr) = \ htobe((htobe(*(type*)(addr)) & ~BITMASK((bf_off), (bf_len))) | \ (((type)(val) << (bf_off)) & BITMASK((bf_off), (bf_len)))) uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); intptr_t res = 0; res = syscall(__NR_socket, 0x10ul, 3ul, 0); if (res != -1) r[0] = res; *(uint64_t*)0x20000380 = 0; *(uint32_t*)0x20000388 = 0; *(uint64_t*)0x20000390 = 0x20000340; *(uint64_t*)0x20000340 = 0x20000b80; *(uint32_t*)0x20000b80 = 0x100; *(uint16_t*)0x20000b84 = 0x30; *(uint16_t*)0x20000b86 = 1; *(uint32_t*)0x20000b88 = 0; *(uint32_t*)0x20000b8c = 0; *(uint8_t*)0x20000b90 = 0; *(uint8_t*)0x20000b91 = 0; *(uint16_t*)0x20000b92 = 0; *(uint16_t*)0x20000b94 = 0xec; *(uint16_t*)0x20000b96 = 1; *(uint16_t*)0x20000b98 = 0x30; STORE_BY_BITMASK(uint16_t, , 0x20000b9a, 3, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x20000b9b, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x20000b9b, 0, 7, 1); *(uint16_t*)0x20000b9c = 0xb; *(uint16_t*)0x20000b9e = 1; memcpy((void*)0x20000ba0, "police\000", 7); *(uint16_t*)0x20000ba8 = 4; STORE_BY_BITMASK(uint16_t, , 0x20000baa, 2, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x20000bab, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x20000bab, 1, 7, 1); *(uint16_t*)0x20000bac = 4; *(uint16_t*)0x20000bae = 6; *(uint16_t*)0x20000bb0 = 0xc; *(uint16_t*)0x20000bb2 = 7; *(uint32_t*)0x20000bb4 = 0; *(uint32_t*)0x20000bb8 = 1; *(uint16_t*)0x20000bbc = 0xc; *(uint16_t*)0x20000bbe = 8; *(uint32_t*)0x20000bc0 = 2; *(uint32_t*)0x20000bc4 = 2; *(uint16_t*)0x20000bc8 = 0x50; STORE_BY_BITMASK(uint16_t, , 0x20000bca, 5, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x20000bcb, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x20000bcb, 0, 7, 1); *(uint16_t*)0x20000bcc = 0xd; *(uint16_t*)0x20000bce = 1; memcpy((void*)0x20000bd0, "connmark\000", 9); *(uint16_t*)0x20000bdc = 0x20; STORE_BY_BITMASK(uint16_t, , 0x20000bde, 2, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x20000bdf, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x20000bdf, 1, 7, 1); *(uint16_t*)0x20000be0 = 0x1c; *(uint16_t*)0x20000be2 = 1; *(uint32_t*)0x20000be4 = 1; *(uint32_t*)0x20000be8 = 5; *(uint32_t*)0x20000bec = 7; *(uint32_t*)0x20000bf0 = 0xfffff801; *(uint32_t*)0x20000bf4 = 0xf; *(uint16_t*)0x20000bf8 = 3; *(uint16_t*)0x20000bfc = 4; *(uint16_t*)0x20000bfe = 6; *(uint16_t*)0x20000c00 = 0xc; *(uint16_t*)0x20000c02 = 7; *(uint32_t*)0x20000c04 = 0; *(uint32_t*)0x20000c08 = 0; *(uint16_t*)0x20000c0c = 0xc; *(uint16_t*)0x20000c0e = 8; *(uint32_t*)0x20000c10 = 1; *(uint32_t*)0x20000c14 = 2; *(uint16_t*)0x20000c18 = 0x68; STORE_BY_BITMASK(uint16_t, , 0x20000c1a, 1, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x20000c1b, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x20000c1b, 0, 7, 1); *(uint16_t*)0x20000c1c = 8; *(uint16_t*)0x20000c1e = 1; memcpy((void*)0x20000c20, "ipt\000", 4); *(uint16_t*)0x20000c24 = 0x40; STORE_BY_BITMASK(uint16_t, , 0x20000c26, 2, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x20000c27, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x20000c27, 1, 7, 1); *(uint16_t*)0x20000c28 = 8; *(uint16_t*)0x20000c2a = 2; *(uint32_t*)0x20000c2c = 0x6ff2b48a; *(uint16_t*)0x20000c30 = 0x2a; *(uint16_t*)0x20000c32 = 6; *(uint16_t*)0x20000c34 = 0; memcpy((void*)0x20000c36, "security\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000", 32); *(uint8_t*)0x20000c56 = 0xfe; *(uint16_t*)0x20000c58 = 0xfff; *(uint16_t*)0x20000c5c = 8; *(uint16_t*)0x20000c5e = 3; *(uint32_t*)0x20000c60 = 0xffff8001; *(uint16_t*)0x20000c64 = 4; *(uint16_t*)0x20000c66 = 6; *(uint16_t*)0x20000c68 = 0xc; *(uint16_t*)0x20000c6a = 7; *(uint32_t*)0x20000c6c = 0; *(uint32_t*)0x20000c70 = 0; *(uint16_t*)0x20000c74 = 0xc; *(uint16_t*)0x20000c76 = 8; *(uint32_t*)0x20000c78 = 2; *(uint32_t*)0x20000c7c = 3; *(uint64_t*)0x20000348 = 0x100; *(uint64_t*)0x20000398 = 1; *(uint64_t*)0x200003a0 = 0; *(uint64_t*)0x200003a8 = 0; *(uint32_t*)0x200003b0 = 0x20000000; syscall(__NR_sendmsg, r[0], 0x20000380ul, 0ul); return 0; }