// https://syzkaller.appspot.com/bug?id=a77dcc06e8bb9e2d0953e5eda733477d83754e23 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_close_range #define __NR_close_range 436 #endif 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; if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { } syscall(__NR_close_range, /*fd=*/2, /*max_fd=*/8, /*flags=*/0); syscall(__NR_socket, /*domain=*/0x10ul, /*type=*/3ul, /*proto=*/0x10); memcpy((void*)0x20000580, "/sys/kernel/debug/tracing/tracing_cpumask\000", 42); syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000580ul, /*flags=O_LARGEFILE|O_RDWR*/ 0x8002, /*mode=*/0); syscall(__NR_write, /*fd=*/3, /*buf=*/0ul, /*count=*/0x7ffffdeful); return 0; }