// autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul); const char* reason; (void)reason; intptr_t res = 0; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } // socket$inet arguments: [ // domain: const = 0x2 (8 bytes) // type: socket_type = 0x1 (8 bytes) // proto: int32 = 0x0 (4 bytes) // ] // returns sock_in res = syscall(__NR_socket, /*domain=*/2ul, /*type=SOCK_STREAM*/ 1ul, /*proto=*/0); if (res != -1) r[0] = res; // setsockopt$SO_ATTACH_FILTER arguments: [ // fd: sock (resource) // level: const = 0x1 (4 bytes) // optname: const = 0x50 (4 bytes) // optval: ptr[in, sock_fprog] { // sock_fprog { // len: len = 0x0 (2 bytes) // pad = 0x0 (6 bytes) // filter: ptr[in, array[sock_filter]] { // array[sock_filter] { // } // } // } // } // optlen: len = 0x10 (8 bytes) // ] *(uint16_t*)0x2000000a2000 = 0; *(uint64_t*)0x2000000a2008 = 0x200000f07000; syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/1, /*optname=*/0x50, /*optval=*/0x2000000a2000ul, /*optlen=*/0x10ul); return 0; }