// https://syzkaller.appspot.com/bug?id=8811da714a6d22caa3b77119a3711303936e598b // 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, 0x20000000ul, 0x1000000ul, 3ul, 0x32ul, -1, 0ul); intptr_t res = 0; res = syscall(__NR_socket, 0x10ul, 0x80002ul, 0); if (res != -1) r[0] = res; *(uint64_t*)0x20002980 = 0; *(uint32_t*)0x20002988 = 0xfffffe55; *(uint64_t*)0x20002990 = 0x20002940; *(uint64_t*)0x20002940 = 0x20000180; *(uint32_t*)0x20000180 = 0x58; *(uint16_t*)0x20000184 = 0x30; *(uint16_t*)0x20000186 = 0x53b; *(uint32_t*)0x20000188 = 0; *(uint32_t*)0x2000018c = 0; *(uint8_t*)0x20000190 = 0; *(uint8_t*)0x20000191 = 0; *(uint16_t*)0x20000192 = 0; *(uint16_t*)0x20000194 = 0x44; *(uint16_t*)0x20000196 = 1; *(uint16_t*)0x20000198 = 0x40; STORE_BY_BITMASK(uint16_t, , 0x2000019a, 1, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x2000019b, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x2000019b, 0, 7, 1); *(uint16_t*)0x2000019c = 0xb; *(uint16_t*)0x2000019e = 1; memcpy((void*)0x200001a0, "sample\000", 7); *(uint16_t*)0x200001a8 = 0x2c; STORE_BY_BITMASK(uint16_t, , 0x200001aa, 2, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x200001ab, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x200001ab, 1, 7, 1); *(uint16_t*)0x200001ac = 8; *(uint16_t*)0x200001ae = 5; *(uint32_t*)0x200001b0 = 0; *(uint16_t*)0x200001b4 = 8; *(uint16_t*)0x200001b6 = 3; *(uint32_t*)0x200001b8 = 0xe5; *(uint16_t*)0x200001bc = 0x18; *(uint16_t*)0x200001be = 2; *(uint32_t*)0x200001c0 = 0; *(uint32_t*)0x200001c4 = 0; *(uint32_t*)0x200001c8 = 0; *(uint32_t*)0x200001cc = 0; *(uint32_t*)0x200001d0 = 0; *(uint16_t*)0x200001d4 = 4; *(uint16_t*)0x200001d6 = 6; *(uint64_t*)0x20002948 = 0x58; *(uint64_t*)0x20002998 = 1; *(uint64_t*)0x200029a0 = 0; *(uint64_t*)0x200029a8 = 0; *(uint32_t*)0x200029b0 = 0; syscall(__NR_sendmsg, r[0], 0x20002980ul, 0ul); return 0; }