// 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$packet arguments: [ // domain: const = 0x11 (8 bytes) // type: packet_socket_type = 0x2 (8 bytes) // proto: const = 0x300 (4 bytes) // ] // returns sock_packet res = syscall(__NR_socket, /*domain=*/0x11ul, /*type=SOCK_DGRAM*/ 2ul, /*proto=*/0x300); if (res != -1) r[0] = res; // setsockopt$packet_tx_ring arguments: [ // fd: sock_packet (resource) // level: const = 0x107 (4 bytes) // optname: const = 0x5 (4 bytes) // optval: ptr[in, tpacket_req_u] { // union tpacket_req_u { // req3: tpacket_req3 { // tp_block_size: int32 = 0x8000 (4 bytes) // tp_block_nr: int32 = 0x6 (4 bytes) // tp_frame_size: int32 = 0x8000 (4 bytes) // tp_frame_nr: int32 = 0x6 (4 bytes) // tp_retire_blk_tov: int32 = 0x8 (4 bytes) // tp_sizeof_priv: int32 = 0x0 (4 bytes) // tp_feature_req_word: int32 = 0x2 (4 bytes) // } // } // } // optlen: len = 0x1c (8 bytes) // ] *(uint32_t*)0x2000000000c0 = 0x8000; *(uint32_t*)0x2000000000c4 = 6; *(uint32_t*)0x2000000000c8 = 0x8000; *(uint32_t*)0x2000000000cc = 6; *(uint32_t*)0x2000000000d0 = 8; *(uint32_t*)0x2000000000d4 = 0; *(uint32_t*)0x2000000000d8 = 2; syscall(__NR_setsockopt, /*fd=*/r[0], /*level=*/0x107, /*optname=*/5, /*optval=*/0x2000000000c0ul, /*optlen=*/0x1cul); // mmap arguments: [ // addr: VMA[0x2000] // len: len = 0x30000 (8 bytes) // prot: mmap_prot = 0x2 (8 bytes) // flags: mmap_flags = 0x11 (8 bytes) // fd: fd (resource) // offset: intptr = 0x0 (8 bytes) // ] syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x30000ul, /*prot=PROT_WRITE*/ 2ul, /*flags=MAP_FIXED|MAP_SHARED*/ 0x11ul, /*fd=*/r[0], /*offset=*/0ul); return 0; }