// https://syzkaller.appspot.com/bug?id=632573d64d1e43e5481ccad1771c7663e9bfecba // 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*)0x20000300 = 0; *(uint32_t*)0x20000308 = 0; *(uint64_t*)0x20000310 = 0x200002c0; *(uint64_t*)0x200002c0 = 0x200021c0; *(uint32_t*)0x200021c0 = 0x68; *(uint16_t*)0x200021c4 = 0x30; *(uint16_t*)0x200021c6 = 0xfb3d; *(uint32_t*)0x200021c8 = 0; *(uint32_t*)0x200021cc = 0; *(uint8_t*)0x200021d0 = 0; *(uint8_t*)0x200021d1 = 0; *(uint16_t*)0x200021d2 = 0; *(uint16_t*)0x200021d4 = 0x54; *(uint16_t*)0x200021d6 = 1; *(uint16_t*)0x200021d8 = 0x50; STORE_BY_BITMASK(uint16_t, , 0x200021da, 1, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x200021db, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x200021db, 0, 7, 1); *(uint16_t*)0x200021dc = 0xf; *(uint16_t*)0x200021de = 1; memcpy((void*)0x200021e0, "tunnel_key\000", 11); *(uint16_t*)0x200021ec = 0x38; STORE_BY_BITMASK(uint16_t, , 0x200021ee, 2, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x200021ef, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x200021ef, 1, 7, 1); *(uint16_t*)0x200021f0 = 8; *(uint16_t*)0x200021f2 = 4; *(uint8_t*)0x200021f4 = 0xac; *(uint8_t*)0x200021f5 = 0x1e; *(uint8_t*)0x200021f6 = 0; *(uint8_t*)0x200021f7 = 1; *(uint16_t*)0x200021f8 = 8; *(uint16_t*)0x200021fa = 3; *(uint8_t*)0x200021fc = 0xac; *(uint8_t*)0x200021fd = 0x14; *(uint8_t*)0x200021fe = 0x14; *(uint8_t*)0x200021ff = 0xaa; *(uint16_t*)0x20002200 = 0x1c; *(uint16_t*)0x20002202 = 2; *(uint32_t*)0x20002204 = 0; *(uint32_t*)0x20002208 = 0; *(uint32_t*)0x2000220c = 0; *(uint32_t*)0x20002210 = 0; *(uint32_t*)0x20002214 = 0; *(uint32_t*)0x20002218 = 1; *(uint16_t*)0x2000221c = 5; *(uint16_t*)0x2000221e = 0xc; *(uint8_t*)0x20002220 = 2; *(uint16_t*)0x20002224 = 4; *(uint16_t*)0x20002226 = 6; *(uint16_t*)0x20002228 = 0; *(uint16_t*)0x2000222a = 7; *(uint32_t*)0x2000222c = 0; *(uint32_t*)0x20002230 = 0; *(uint16_t*)0x20002234 = 0; *(uint16_t*)0x20002236 = 8; *(uint32_t*)0x20002238 = 0; *(uint32_t*)0x2000223c = 0; *(uint64_t*)0x200002c8 = 0x68; *(uint64_t*)0x20000318 = 1; *(uint64_t*)0x20000320 = 0; *(uint64_t*)0x20000328 = 0; *(uint32_t*)0x20000330 = 0; syscall(__NR_sendmsg, r[0], 0x20000300ul, 0ul); return 0; }