// https://syzkaller.appspot.com/bug?id=7eedce59d748e85a76ffd05468bd31c6074d990e // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include 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)) { } memcpy((void*)0x20001040, "/sys/kernel/security/tomoyo/manager\000", 36); syscall( __NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20001040ul, /*flags=O_SYNC|O_NONBLOCK|O_NOCTTY|O_NOATIME|O_LARGEFILE|O_CREAT|0x2002*/ 0x14b942, /*mode=*/0); syscall(__NR_mmap, /*addr=*/0ul, /*len=*/0x400005ul, /*prot=*/0xfffffffffffffffeul, /*flags=*/0x9b72ul, /*fd=*/2ul, /*off=*/0x8000ul); syscall(__NR_write, /*fd=*/3, /*buf=*/0ul, /*count=*/0xfffffdeful); return 0; }