map[SimplifiedCRepro:// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#ifndef __NR_bpf
#define __NR_bpf 321
#endif
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 arguments: [
// domain: socket_domain = 0xa (8 bytes)
// type: socket_type = 0x3 (8 bytes)
// proto: int32 = 0x4 (4 bytes)
// ]
// returns sock
res = syscall(__NR_socket, /*domain=AF_INET6*/0xaul, /*type=SOCK_RAW*/3ul, /*proto=*/4);
if (res != -1)
r[0] = res;
// bpf$BPF_BTF_LOAD arguments: [
// cmd: const = 0x12 (8 bytes)
// arg: ptr[in, bpf_btf_load] {
// bpf_btf_load {
// btf: ptr[inout, array[ANYUNION]] {
// array[ANYUNION] {
// union ANYUNION {
// ANYBLOB: buffer: {9f eb 01 00 18 00 00 00 00 00 00 00 1c 00 00 00 1c 00 00 00 02 00 00 00 00 00 00 00 00 00 00 01 05 00 00 00 00 03 00 00 00 00 00 00 00 00 00 09 00 00 00 00 00 00} (length 0x36)
// }
// }
// }
// btf_log_buf: nil
// btf_size: bytesize = 0x36 (4 bytes)
// btf_log_size: bytesize = 0x0 (4 bytes)
// btf_log_level: int32 = 0x0 (4 bytes)
// btf_log_true_size: int32 = 0x0 (4 bytes)
// btf_flags: btf_load_flags = 0x0 (4 bytes)
// btf_token_fd: union _bpf_btf_load_btf_token_fd_wrapper {
// void: buffer: {} (length 0x0)
// }
// pad: union _bpf_btf_load_pad_wrapper {
// value: const = 0x0 (4 bytes)
// }
// }
// }
// size: len = 0x20 (8 bytes)
// ]
// returns fd_btf
*(uint64_t*)0x200000000280 = 0x200000000000;
memcpy((void*)0x200000000000, "... [truncated large byte array] ...", 54);
*(uint64_t*)0x200000000288 = 0;
*(uint32_t*)0x200000000290 = 0x36;
*(uint32_t*)0x200000000294 = 0;
*(uint32_t*)0x200000000298 = 0;
*(uint32_t*)0x20000000029c = 0;
*(uint32_t*)0x2000000002a0 = 0;
*(uint32_t*)0x2000000002a4 = 0;
syscall(__NR_bpf, /*cmd=*/0x12ul, /*arg=*/0x200000000280ul, /*size=*/0x20ul);
// ioctl$sock_SIOCBRDELBR arguments: [
// fd: sock (resource)
// cmd: const = 0x89a2 (4 bytes)
// arg: ptr[in, buffer] {
// buffer: {62 72 69 64 67 65 30 00 00 00 00 00 00 00 00 00} (length 0x10)
// }
// ]
memcpy((void*)0x200000000000, "bridge0\000\000\000\000\000\000\000\000\000", 16);
syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x89a2, /*arg=*/0x200000000000ul);
return 0;
}
]