// https://syzkaller.appspot.com/bug?id=f119ad453dec99a1fb65009ec22c8b1b41822ccf // 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 222 #endif #ifndef __NR_sendmsg #define __NR_sendmsg 211 #endif #ifndef __NR_setsockopt #define __NR_setsockopt 208 #endif #ifndef __NR_socket #define __NR_socket 198 #endif uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } res = syscall(__NR_socket, /*domain=*/0x2bul, /*type=*/1ul, /*proto=*/0); if (res != -1) r[0] = res; syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/0, /*optname=IP_ADD_SOURCE_MEMBERSHIP*/ 0x27, /*optval=*/0ul, /*optlen=*/0ul); res = syscall(__NR_socket, /*domain=*/0xaul, /*type=SOCK_CLOEXEC|SOCK_DGRAM*/ 0x80002ul, /*proto=*/0); if (res != -1) r[1] = res; syscall(__NR_setsockopt, /*fd=*/r[1], /*level=*/0x29, /*optname=IPV6_JOIN_ANYCAST*/ 0x1b, /*optval=*/0ul, /*optlen=*/0ul); res = syscall(__NR_socket, /*domain=*/0xaul, /*type=SOCK_STREAM*/ 1ul, /*proto=*/0x100); if (res != -1) r[2] = res; *(uint64_t*)0x20000200 = 0; *(uint32_t*)0x20000208 = 0; *(uint64_t*)0x20000210 = 0; *(uint64_t*)0x20000218 = 0; *(uint64_t*)0x20000220 = 0; *(uint64_t*)0x20000228 = 0; *(uint32_t*)0x20000230 = 0; syscall( __NR_sendmsg, /*fd=*/r[2], /*msg=*/0x20000200ul, /*f=MSG_ZEROCOPY|MSG_FASTOPEN|MSG_DONTWAIT|MSG_CONFIRM*/ 0x24000840ul); return 0; }