// https://syzkaller.appspot.com/bug?id=d59410639c60dd2cc39f2a81dbc630ba460c2018 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_mmap #define __NR_mmap 192 #endif #ifndef __NR_sendmmsg #define __NR_sendmmsg 345 #endif #ifndef __NR_setsockopt #define __NR_setsockopt 366 #endif #ifndef __NR_socketpair #define __NR_socketpair 360 #endif #undef __NR_mmap #define __NR_mmap __NR_mmap2 uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x1ffff000, 0x1000, 0, 0x32, -1, 0); syscall(__NR_mmap, 0x20000000, 0x1000000, 7, 0x32, -1, 0); syscall(__NR_mmap, 0x21000000, 0x1000, 0, 0x32, -1, 0); intptr_t res = 0; res = syscall(__NR_socketpair, 1, 2, 0, 0x20000000); if (res != -1) { r[0] = *(uint32_t*)0x20000000; r[1] = *(uint32_t*)0x20000004; } *(uint16_t*)0x20000080 = 2; *(uint32_t*)0x20000084 = 0x20000280; *(uint16_t*)0x20000280 = 0x20; *(uint8_t*)0x20000282 = 0; *(uint8_t*)0x20000283 = 0; *(uint32_t*)0x20000284 = 0xfffff008; *(uint16_t*)0x20000288 = 6; *(uint8_t*)0x2000028a = 0; *(uint8_t*)0x2000028b = 0; *(uint32_t*)0x2000028c = 0; syscall(__NR_setsockopt, (intptr_t)r[1], 1, 0x1a, 0x20000080, 0x10); syscall(__NR_sendmmsg, (intptr_t)r[0], 0x20001e00, 0xfffffe36, 0); return 0; }