// https://syzkaller.appspot.com/bug?id=8bf9a9a2638fc9e95348d4398decb1b5c80beecb // autogenerated by syzkaller (http://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include long r[12]; void* thr(void* arg) { switch ((long)arg) { case 0: r[0] = syscall(__NR_mmap, 0x20000000ul, 0xfff000ul, 0x3ul, 0x32ul, 0xfffffffffffffffful, 0x0ul); break; case 1: r[1] = syscall(__NR_pipe, 0x20d20000ul); if (r[1] != -1) r[2] = *(uint32_t*)0x20d20000; if (r[1] != -1) r[3] = *(uint32_t*)0x20d20004; break; case 2: r[4] = syscall(__NR_socket, 0x2ul, 0x1ul, 0x0ul); break; case 3: r[5] = syscall(__NR_splice, r[2], 0x0ul, r[4], 0x0ul, 0x1ful, 0x0ul); break; case 4: *(uint64_t*)0x20844fe0 = (uint64_t)0x20882ff6; *(uint64_t*)0x20844fe8 = (uint64_t)0x0; *(uint64_t*)0x20844ff0 = (uint64_t)0x20caffec; *(uint64_t*)0x20844ff8 = (uint64_t)0x14; memcpy((void*)0x20caffec, "\xce\x16\xb7\x5c\xf4\xc6\xf8\x31\xb7\x83\x18\x00\x43\x5a" "\x57\x5a\xcb\x2a\xc1\xb4", 20); r[11] = syscall(__NR_writev, r[3], 0x20844fe0ul, 0x2ul); break; } return 0; } void loop() { long i; pthread_t th[10]; memset(r, -1, sizeof(r)); for (i = 0; i < 5; i++) { pthread_create(&th[i], 0, thr, (void*)i); usleep(rand() % 10000); } usleep(rand() % 100000); } int main() { loop(); return 0; }