// https://syzkaller.appspot.com/bug?id=320298be5b80117982e7b7870314f09efa150ae7 // 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, 0); intptr_t res = 0; res = syscall(__NR_socket, 0x10ul, 0x80002ul, 0); if (res != -1) r[0] = res; *(uint64_t*)0x20002980 = 0; *(uint32_t*)0x20002988 = 0; *(uint64_t*)0x20002990 = 0x20002940; *(uint64_t*)0x20002940 = 0x20000100; *(uint32_t*)0x20000100 = 0x58; *(uint16_t*)0x20000104 = 0x30; *(uint16_t*)0x20000106 = 0x53b; *(uint32_t*)0x20000108 = 0; *(uint32_t*)0x2000010c = 0; *(uint8_t*)0x20000110 = 0; *(uint8_t*)0x20000111 = 0; *(uint16_t*)0x20000112 = 0; *(uint16_t*)0x20000114 = 0x44; *(uint16_t*)0x20000116 = 1; *(uint16_t*)0x20000118 = 0x40; STORE_BY_BITMASK(uint16_t, , 0x2000011a, 1, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x2000011b, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x2000011b, 0, 7, 1); *(uint16_t*)0x2000011c = 0xb; *(uint16_t*)0x2000011e = 1; memcpy((void*)0x20000120, "sample\000", 7); *(uint16_t*)0x20000128 = 0x2c; STORE_BY_BITMASK(uint16_t, , 0x2000012a, 2, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x2000012b, 0, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x2000012b, 1, 7, 1); *(uint16_t*)0x2000012c = 8; *(uint16_t*)0x2000012e = 5; *(uint32_t*)0x20000130 = 0; *(uint16_t*)0x20000134 = 8; *(uint16_t*)0x20000136 = 3; *(uint32_t*)0x20000138 = 0; *(uint16_t*)0x2000013c = 0x18; *(uint16_t*)0x2000013e = 2; *(uint32_t*)0x20000140 = 0; *(uint32_t*)0x20000144 = 0; *(uint32_t*)0x20000148 = 0; *(uint32_t*)0x2000014c = 0; *(uint32_t*)0x20000150 = 0; *(uint16_t*)0x20000154 = 4; *(uint16_t*)0x20000156 = 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; }