// https://syzkaller.appspot.com/bug?id=c7ac769bd7ee15549b8a2be188bcee07d98a5357 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #define __syscall syscall uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x1012ul, -1, 0ul); intptr_t res = 0; memcpy((void*)0x20000140, "./bus\000", 6); syscall(SYS_mknod, 0x20000140ul, 0x2000ul, 0x4086337); /* major = 99, minor = 264247 */ *(uint32_t*)0x200000c0 = 6; *(uint64_t*)0x200000c8 = 0x20000080; *(uint16_t*)0x20000080 = 0; *(uint8_t*)0x20000082 = 0; *(uint8_t*)0x20000083 = 0; *(uint32_t*)0x20000084 = 0; *(uint16_t*)0x20000088 = 0; *(uint8_t*)0x2000008a = 0; *(uint8_t*)0x2000008b = 0; *(uint32_t*)0x2000008c = 0; *(uint16_t*)0x20000090 = 0; *(uint8_t*)0x20000092 = 0; *(uint8_t*)0x20000093 = 0; *(uint32_t*)0x20000094 = 0; *(uint16_t*)0x20000098 = 0; *(uint8_t*)0x2000009a = 0; *(uint8_t*)0x2000009b = 0; *(uint32_t*)0x2000009c = 0; *(uint16_t*)0x200000a0 = 0; *(uint8_t*)0x200000a2 = 0; *(uint8_t*)0x200000a3 = 0; *(uint32_t*)0x200000a4 = 0; *(uint16_t*)0x200000a8 = 0x210; *(uint8_t*)0x200000aa = 0; *(uint8_t*)0x200000ab = 0; *(uint32_t*)0x200000ac = 0; syscall(SYS_ioctl, -1, 0x80104277ul, 0x200000c0ul); *(uint32_t*)0x20000040 = -1; *(uint16_t*)0x20000048 = 0xfffa; *(uint16_t*)0x2000004a = 0; *(uint32_t*)0x2000004c = 0; *(uint64_t*)0x20000050 = 0; *(uint64_t*)0x20000058 = 0; *(uint32_t*)0x20000060 = -1; *(uint16_t*)0x20000068 = 0; *(uint16_t*)0x2000006a = 0; *(uint32_t*)0x2000006c = 0; *(uint64_t*)0x20000070 = 0; *(uint64_t*)0x20000078 = 0; syscall(SYS_kevent, -1, 0x20000040ul, 0, 0ul, 0, 0ul); memcpy((void*)0x20000100, "./bus\000", 6); res = syscall(SYS_open, 0x20000100ul, 0ul, 0ul); if (res != -1) r[0] = res; *(uint64_t*)0x20000480 = 0; *(uint64_t*)0x20000488 = 0; *(uint64_t*)0x20000490 = 0x20000280; memcpy((void*)0x20000280, "\x45\xbc\x86\x76\xe2\xca\x7b\x05\xe0\xc4\x3b\x19\x25\xc7\x93\xc4\x7f" "\x0d\x65\x5c\x62\x88\x64\xe8\x54\xdf\x02\x0d\x2f\xae\x90\x8e\xb1\xc4" "\x6e\xed\x47\x40\x0a\x16\xcf\x91\x6a\x0a\xff\x5f\x29\x92\x12\x60\x54" "\xc5\x05\xc3\x59\xe3\xbf\x1a\x3e\xbc\x14\x24\x15\x16\xb4\x6f\xd2\x40" "\xe3\xfb\x00\xae\xc8\xaf\x0d\x50\x1d\xa3\xa9\xc2\x9b\x5d\x1c", 83); *(uint64_t*)0x20000498 = 0x53; *(uint64_t*)0x200004a0 = 0; *(uint64_t*)0x200004a8 = 0; *(uint64_t*)0x200004b0 = 0; *(uint64_t*)0x200004b8 = 0; syscall(SYS_pwritev, r[0], 0x20000480ul, 4ul, 0x100000000000000ul); *(uint64_t*)0x20000180 = 0; *(uint32_t*)0x20000188 = 0; *(uint64_t*)0x20000190 = 0; *(uint64_t*)0x20000198 = 0; *(uint64_t*)0x200001a0 = 0; *(uint64_t*)0x200001a8 = 0x210; *(uint32_t*)0x200001b0 = 0; syscall(SYS_sendmsg, -1, 0x20000180ul, 0ul); *(uint32_t*)0x20000040 = 2; syscall(SYS_ioctl, r[0], 0x82907003ul, 0x20000040ul); return 0; }