// https://syzkaller.appspot.com/bug?id=b13a975b151d0581d66bdd367e8065a0c7f42b13 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #ifndef __NR_ioctl #define __NR_ioctl 29 #endif #ifndef __NR_mmap #define __NR_mmap 222 #endif #ifndef __NR_openat #define __NR_openat 56 #endif #ifndef __NR_write #define __NR_write 64 #endif uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=*/7ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul); intptr_t res = 0; memcpy((void*)0x20000040, "/dev/uinput\000", 12); res = syscall(__NR_openat, /*fd=*/0xffffffffffffff9cul, /*file=*/0x20000040ul, /*flags=*/0x802ul, /*mode=*/0ul); if (res != -1) r[0] = res; *(uint16_t*)0x20000340 = 0x2f; *(uint32_t*)0x20000344 = 0; *(uint32_t*)0x20000348 = 0; *(uint32_t*)0x2000034c = 0; *(uint32_t*)0x20000350 = 0; *(uint32_t*)0x20000354 = 0; *(uint32_t*)0x20000358 = 0; syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x401c5504, /*arg=*/0x20000340ul); syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x40045564, /*arg=*/3ul); memcpy((void*)0x20000800, "syz0\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000\000", 80); *(uint16_t*)0x20000850 = 0xfffd; *(uint16_t*)0x20000852 = 0; *(uint16_t*)0x20000854 = 4; *(uint16_t*)0x20000856 = 8; *(uint32_t*)0x20000858 = 0x14; *(uint32_t*)0x2000085c = 1; *(uint32_t*)0x20000860 = 0xffff8000; *(uint32_t*)0x20000864 = 4; *(uint32_t*)0x20000868 = 0xdfa; *(uint32_t*)0x2000086c = 0x91c; *(uint32_t*)0x20000870 = 0x7ff; *(uint32_t*)0x20000874 = 0; *(uint32_t*)0x20000878 = 0; *(uint32_t*)0x2000087c = 0x7fffffff; *(uint32_t*)0x20000880 = 0xefc; *(uint32_t*)0x20000884 = 7; *(uint32_t*)0x20000888 = 6; *(uint32_t*)0x2000088c = 5; *(uint32_t*)0x20000890 = 1; *(uint32_t*)0x20000894 = 9; *(uint32_t*)0x20000898 = 7; *(uint32_t*)0x2000089c = 0x1f; *(uint32_t*)0x200008a0 = 0xffffff25; *(uint32_t*)0x200008a4 = 0x80000001; *(uint32_t*)0x200008a8 = 2; *(uint32_t*)0x200008ac = 2; *(uint32_t*)0x200008b0 = -1; *(uint32_t*)0x200008b4 = 0xff; *(uint32_t*)0x200008b8 = 4; *(uint32_t*)0x200008bc = 0x7f; *(uint32_t*)0x200008c0 = 3; *(uint32_t*)0x200008c4 = 4; *(uint32_t*)0x200008c8 = 0x3f; *(uint32_t*)0x200008cc = 0; *(uint32_t*)0x200008d0 = 0x100; *(uint32_t*)0x200008d4 = 0x7fff; *(uint32_t*)0x200008d8 = 0x800; *(uint32_t*)0x200008dc = 0x2438; *(uint32_t*)0x200008e0 = 0xfffffff9; *(uint32_t*)0x200008e4 = 0x8001; *(uint32_t*)0x200008e8 = 0x1000; *(uint32_t*)0x200008ec = 0x7c8; *(uint32_t*)0x200008f0 = 1; *(uint32_t*)0x200008f4 = 0x400; *(uint32_t*)0x200008f8 = 0x101; *(uint32_t*)0x200008fc = 0x200; *(uint32_t*)0x20000900 = 9; *(uint32_t*)0x20000904 = 0x1ff; *(uint32_t*)0x20000908 = 1; *(uint32_t*)0x2000090c = 8; *(uint32_t*)0x20000910 = 1; *(uint32_t*)0x20000914 = 4; *(uint32_t*)0x20000918 = 0x7acba416; *(uint32_t*)0x2000091c = 0xb9; *(uint32_t*)0x20000920 = 0x457; *(uint32_t*)0x20000924 = 0x10000; *(uint32_t*)0x20000928 = 8; *(uint32_t*)0x2000092c = 9; *(uint32_t*)0x20000930 = 0xc736; *(uint32_t*)0x20000934 = 0x2948; *(uint32_t*)0x20000938 = 0x7f; *(uint32_t*)0x2000093c = 0xd6a; *(uint32_t*)0x20000940 = 0; *(uint32_t*)0x20000944 = 0xfffffffc; *(uint32_t*)0x20000948 = 0; *(uint32_t*)0x2000094c = 5; *(uint32_t*)0x20000950 = 0x7fffffff; *(uint32_t*)0x20000954 = 3; *(uint32_t*)0x20000958 = 1; *(uint32_t*)0x2000095c = 0x3f; *(uint32_t*)0x20000960 = 2; *(uint32_t*)0x20000964 = 5; *(uint32_t*)0x20000968 = 0x20; *(uint32_t*)0x2000096c = 0; *(uint32_t*)0x20000970 = 0x33; *(uint32_t*)0x20000974 = 2; *(uint32_t*)0x20000978 = 0x1000; *(uint32_t*)0x2000097c = 4; *(uint32_t*)0x20000980 = 3; *(uint32_t*)0x20000984 = 1; *(uint32_t*)0x20000988 = 4; *(uint32_t*)0x2000098c = -1; *(uint32_t*)0x20000990 = 7; *(uint32_t*)0x20000994 = 0x81; *(uint32_t*)0x20000998 = 0; *(uint32_t*)0x2000099c = 2; *(uint32_t*)0x200009a0 = 2; *(uint32_t*)0x200009a4 = 0x1ff; *(uint32_t*)0x200009a8 = 2; *(uint32_t*)0x200009ac = 8; *(uint32_t*)0x200009b0 = 5; *(uint32_t*)0x200009b4 = 8; *(uint32_t*)0x200009b8 = 1; *(uint32_t*)0x200009bc = 8; *(uint32_t*)0x200009c0 = 0x7f; *(uint32_t*)0x200009c4 = 5; *(uint32_t*)0x200009c8 = 4; *(uint32_t*)0x200009cc = 0xd4d0; *(uint32_t*)0x200009d0 = 1; *(uint32_t*)0x200009d4 = 0x7f345ea2; *(uint32_t*)0x200009d8 = 1; *(uint32_t*)0x200009dc = 0x80; *(uint32_t*)0x200009e0 = 0x4bab; *(uint32_t*)0x200009e4 = 3; *(uint32_t*)0x200009e8 = 1; *(uint32_t*)0x200009ec = 5; *(uint32_t*)0x200009f0 = 0x81; *(uint32_t*)0x200009f4 = 4; *(uint32_t*)0x200009f8 = 4; *(uint32_t*)0x200009fc = 3; *(uint32_t*)0x20000a00 = 0x100; *(uint32_t*)0x20000a04 = 0x1a4; *(uint32_t*)0x20000a08 = 1; *(uint32_t*)0x20000a0c = 0x616d; *(uint32_t*)0x20000a10 = 0xcef8; *(uint32_t*)0x20000a14 = 4; *(uint32_t*)0x20000a18 = 0x74e2; *(uint32_t*)0x20000a1c = 0; *(uint32_t*)0x20000a20 = 0x100; *(uint32_t*)0x20000a24 = 6; *(uint32_t*)0x20000a28 = 5; *(uint32_t*)0x20000a2c = 0x736693e7; *(uint32_t*)0x20000a30 = 2; *(uint32_t*)0x20000a34 = 0; *(uint32_t*)0x20000a38 = 0x80000000; *(uint32_t*)0x20000a3c = 5; *(uint32_t*)0x20000a40 = 1; *(uint32_t*)0x20000a44 = 9; *(uint32_t*)0x20000a48 = 9; *(uint32_t*)0x20000a4c = 0xffff0000; *(uint32_t*)0x20000a50 = 8; *(uint32_t*)0x20000a54 = 0xfffffff7; *(uint32_t*)0x20000a58 = 0xff; *(uint32_t*)0x20000a5c = 1; *(uint32_t*)0x20000a60 = 0x80000001; *(uint32_t*)0x20000a64 = 8; *(uint32_t*)0x20000a68 = 0x80000000; *(uint32_t*)0x20000a6c = 2; *(uint32_t*)0x20000a70 = 6; *(uint32_t*)0x20000a74 = 8; *(uint32_t*)0x20000a78 = 3; *(uint32_t*)0x20000a7c = 0; *(uint32_t*)0x20000a80 = 0xff; *(uint32_t*)0x20000a84 = 3; *(uint32_t*)0x20000a88 = 7; *(uint32_t*)0x20000a8c = 0xfffffbff; *(uint32_t*)0x20000a90 = 1; *(uint32_t*)0x20000a94 = 8; *(uint32_t*)0x20000a98 = 0x4246ffc4; *(uint32_t*)0x20000a9c = 0x792; *(uint32_t*)0x20000aa0 = 4; *(uint32_t*)0x20000aa4 = 0x28; *(uint32_t*)0x20000aa8 = 4; *(uint32_t*)0x20000aac = 0x10001; *(uint32_t*)0x20000ab0 = 0; *(uint32_t*)0x20000ab4 = 0; *(uint32_t*)0x20000ab8 = 8; *(uint32_t*)0x20000abc = 4; *(uint32_t*)0x20000ac0 = 0x70b; *(uint32_t*)0x20000ac4 = 0xa90e; *(uint32_t*)0x20000ac8 = 3; *(uint32_t*)0x20000acc = 0xa372; *(uint32_t*)0x20000ad0 = 0x1000; *(uint32_t*)0x20000ad4 = 3; *(uint32_t*)0x20000ad8 = 9; *(uint32_t*)0x20000adc = 2; *(uint32_t*)0x20000ae0 = 0x140; *(uint32_t*)0x20000ae4 = 0xc7b; *(uint32_t*)0x20000ae8 = 0xfffffff7; *(uint32_t*)0x20000aec = 0xffff; *(uint32_t*)0x20000af0 = 8; *(uint32_t*)0x20000af4 = 9; *(uint32_t*)0x20000af8 = 1; *(uint32_t*)0x20000afc = 7; *(uint32_t*)0x20000b00 = 0x200; *(uint32_t*)0x20000b04 = 1; *(uint32_t*)0x20000b08 = 8; *(uint32_t*)0x20000b0c = 0; *(uint32_t*)0x20000b10 = 0x49; *(uint32_t*)0x20000b14 = 0; *(uint32_t*)0x20000b18 = 5; *(uint32_t*)0x20000b1c = 0xfffb; *(uint32_t*)0x20000b20 = 8; *(uint32_t*)0x20000b24 = 0; *(uint32_t*)0x20000b28 = 0x1f; *(uint32_t*)0x20000b2c = 0x400; *(uint32_t*)0x20000b30 = 0x80000000; *(uint32_t*)0x20000b34 = 0xd45; *(uint32_t*)0x20000b38 = 4; *(uint32_t*)0x20000b3c = 0xf28; *(uint32_t*)0x20000b40 = 9; *(uint32_t*)0x20000b44 = 6; *(uint32_t*)0x20000b48 = 0; *(uint32_t*)0x20000b4c = 1; *(uint32_t*)0x20000b50 = 1; *(uint32_t*)0x20000b54 = 0x10000; *(uint32_t*)0x20000b58 = 0; *(uint32_t*)0x20000b5c = 0x443f7133; *(uint32_t*)0x20000b60 = 5; *(uint32_t*)0x20000b64 = 5; *(uint32_t*)0x20000b68 = 0xc5da; *(uint32_t*)0x20000b6c = 4; *(uint32_t*)0x20000b70 = 6; *(uint32_t*)0x20000b74 = 8; *(uint32_t*)0x20000b78 = 8; *(uint32_t*)0x20000b7c = 0x80; *(uint32_t*)0x20000b80 = 0xc6; *(uint32_t*)0x20000b84 = 0x8001; *(uint32_t*)0x20000b88 = 7; *(uint32_t*)0x20000b8c = 0x74; *(uint32_t*)0x20000b90 = 0x702; *(uint32_t*)0x20000b94 = 0x5f; *(uint32_t*)0x20000b98 = 0x8cf; *(uint32_t*)0x20000b9c = 0x101; *(uint32_t*)0x20000ba0 = 0x100; *(uint32_t*)0x20000ba4 = 3; *(uint32_t*)0x20000ba8 = 0x56; *(uint32_t*)0x20000bac = 7; *(uint32_t*)0x20000bb0 = 9; *(uint32_t*)0x20000bb4 = 1; *(uint32_t*)0x20000bb8 = 5; *(uint32_t*)0x20000bbc = 0x3417; *(uint32_t*)0x20000bc0 = 0x100; *(uint32_t*)0x20000bc4 = 1; *(uint32_t*)0x20000bc8 = 9; *(uint32_t*)0x20000bcc = 7; *(uint32_t*)0x20000bd0 = 0x23bc; *(uint32_t*)0x20000bd4 = 7; *(uint32_t*)0x20000bd8 = 9; *(uint32_t*)0x20000bdc = 0xfffffffe; *(uint32_t*)0x20000be0 = 0x200000; *(uint32_t*)0x20000be4 = 9; *(uint32_t*)0x20000be8 = 7; *(uint32_t*)0x20000bec = 9; *(uint32_t*)0x20000bf0 = 0x3f; *(uint32_t*)0x20000bf4 = 0x200; *(uint32_t*)0x20000bf8 = 0xa7; *(uint32_t*)0x20000bfc = 7; *(uint32_t*)0x20000c00 = 0x7fffffff; *(uint32_t*)0x20000c04 = 0; *(uint32_t*)0x20000c08 = 0x7ff; *(uint32_t*)0x20000c0c = 0x8000; *(uint32_t*)0x20000c10 = 0x7fff; *(uint32_t*)0x20000c14 = 5; *(uint32_t*)0x20000c18 = 5; *(uint32_t*)0x20000c1c = 0x79c06575; *(uint32_t*)0x20000c20 = 9; *(uint32_t*)0x20000c24 = 6; *(uint32_t*)0x20000c28 = 0x10000; *(uint32_t*)0x20000c2c = 3; *(uint32_t*)0x20000c30 = 0xffff; *(uint32_t*)0x20000c34 = 0xfff; *(uint32_t*)0x20000c38 = 5; *(uint32_t*)0x20000c3c = 0x8000; *(uint32_t*)0x20000c40 = 0; *(uint32_t*)0x20000c44 = 0x10c1; *(uint32_t*)0x20000c48 = 7; *(uint32_t*)0x20000c4c = 0x3f; *(uint32_t*)0x20000c50 = 0x254c; *(uint32_t*)0x20000c54 = 8; *(uint32_t*)0x20000c58 = 0xe4a; syscall(__NR_write, /*fd=*/r[0], /*data=*/0x20000800ul, /*len=*/0x45cul); syscall(__NR_ioctl, /*fd=*/r[0], /*cmd=*/0x5501, 0); return 0; }