// https://syzkaller.appspot.com/bug?id=7d816cd23444dc9652fa79e7a03003012bc2951d // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include const int kInitNetNsFd = 239; static long syz_init_net_socket(volatile long domain, volatile long type, volatile long proto) { return syscall(__NR_socket, domain, type, proto); } uint64_t r[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x32ul, -1, 0); intptr_t res = 0; memcpy((void*)0x20000040, "/dev/vhost-net\000", 15); res = syscall(__NR_openat, 0xffffffffffffff9cul, 0x20000040ul, 2ul, 0ul); if (res != -1) r[0] = res; syscall(__NR_ioctl, r[0], 0x40000000af01ul, 0ul); memcpy((void*)0x20000000, "/dev/audio\000", 11); res = syscall(__NR_openat, 0xffffffffffffff9cul, 0x20000000ul, 0ul, 0ul); if (res != -1) r[1] = res; res = syz_init_net_socket(3, 3, 0); if (res != -1) r[2] = res; syscall(__NR_dup2, r[2], r[1]); syscall(__NR_ioctl, r[0], 0x4008af03ul, 0x200002c0ul); *(uint32_t*)0x20f1dff8 = 0; *(uint32_t*)0x20f1dffc = r[1]; syscall(__NR_ioctl, r[0], 0x4008af30ul, 0x20f1dff8ul); return 0; }