// https://syzkaller.appspot.com/bug?id=779a64ccaefd969d5d9bc72a7c4fe39598d53884 // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void sleep_ms(uint64_t ms) { usleep(ms * 1000); } static uint64_t current_time_ms(void) { struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts)) exit(1); return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; } #define BITMASK(bf_off, bf_len) (((1ull << (bf_len)) - 1) << (bf_off)) #define STORE_BY_BITMASK(type, htobe, addr, val, bf_off, bf_len) \ *(type*)(addr) = \ htobe((htobe(*(type*)(addr)) & ~BITMASK((bf_off), (bf_len))) | \ (((type)(val) << (bf_off)) & BITMASK((bf_off), (bf_len)))) static bool write_file(const char* file, const char* what, ...) { char buf[1024]; va_list args; va_start(args, what); vsnprintf(buf, sizeof(buf), what, args); va_end(args); buf[sizeof(buf) - 1] = 0; int len = strlen(buf); int fd = open(file, O_WRONLY | O_CLOEXEC); if (fd == -1) return false; if (write(fd, buf, len) != len) { int err = errno; close(fd); errno = err; return false; } close(fd); return true; } static void kill_and_wait(int pid, int* status) { kill(-pid, SIGKILL); kill(pid, SIGKILL); for (int i = 0; i < 100; i++) { if (waitpid(-1, status, WNOHANG | __WALL) == pid) return; usleep(1000); } DIR* dir = opendir("/sys/fs/fuse/connections"); if (dir) { for (;;) { struct dirent* ent = readdir(dir); if (!ent) break; if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; char abort[300]; snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort", ent->d_name); int fd = open(abort, O_WRONLY); if (fd == -1) { continue; } if (write(fd, abort, 1) < 0) { } close(fd); } closedir(dir); } else { } while (waitpid(-1, status, __WALL) != pid) { } } static void setup_test() { prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setpgrp(); write_file("/proc/self/oom_score_adj", "1000"); } static void execute_one(void); #define WAIT_FLAGS __WALL static void loop(void) { int iter = 0; for (;; iter++) { int pid = fork(); if (pid < 0) exit(1); if (pid == 0) { setup_test(); execute_one(); exit(0); } int status = 0; uint64_t start = current_time_ms(); for (;;) { if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; sleep_ms(1); if (current_time_ms() - start < 5000) { continue; } kill_and_wait(pid, &status); break; } } } uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; void execute_one(void) { intptr_t res = 0; syscall(__NR_clone, 0x6cbaa500ul, 0ul, 0ul, 0ul, 0ul); res = syscall(__NR_socket, 0xaul, 1ul, 0); if (res != -1) r[0] = res; memcpy((void*)0x20000140, "filter\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", 32); *(uint32_t*)0x20000160 = 0xe; *(uint32_t*)0x20000164 = 4; *(uint32_t*)0x20000168 = 0x3c8; *(uint32_t*)0x2000016c = 0xd0; *(uint32_t*)0x20000170 = 0; *(uint32_t*)0x20000174 = 0x1f8; *(uint32_t*)0x20000178 = 0; *(uint32_t*)0x2000017c = 0xd0; *(uint32_t*)0x20000180 = 0x2c0; *(uint32_t*)0x20000184 = 0x2f8; *(uint32_t*)0x20000188 = 0x2f8; *(uint32_t*)0x2000018c = 0x2f8; *(uint32_t*)0x20000190 = 0x2c0; *(uint32_t*)0x20000194 = 4; *(uint64_t*)0x20000198 = 0; *(uint8_t*)0x200001a0 = 0; *(uint8_t*)0x200001a1 = 0; *(uint8_t*)0x200001a2 = 0; *(uint8_t*)0x200001a3 = 0; *(uint8_t*)0x200001a4 = 0; *(uint8_t*)0x200001a5 = 0; *(uint8_t*)0x200001a6 = 0; *(uint8_t*)0x200001a7 = 0; *(uint8_t*)0x200001a8 = 0; *(uint8_t*)0x200001a9 = 0; *(uint8_t*)0x200001aa = 0; *(uint8_t*)0x200001ab = 0; *(uint8_t*)0x200001ac = 0; *(uint8_t*)0x200001ad = 0; *(uint8_t*)0x200001ae = 0; *(uint8_t*)0x200001af = 0; *(uint8_t*)0x200001b0 = 0; *(uint8_t*)0x200001b1 = 0; *(uint8_t*)0x200001b2 = 0; *(uint8_t*)0x200001b3 = 0; *(uint8_t*)0x200001b4 = 0; *(uint8_t*)0x200001b5 = 0; *(uint8_t*)0x200001b6 = 0; *(uint8_t*)0x200001b7 = 0; *(uint8_t*)0x200001b8 = 0; *(uint8_t*)0x200001b9 = 0; *(uint8_t*)0x200001ba = 0; *(uint8_t*)0x200001bb = 0; *(uint8_t*)0x200001bc = 0; *(uint8_t*)0x200001bd = 0; *(uint8_t*)0x200001be = 0; *(uint8_t*)0x200001bf = 0; *(uint8_t*)0x200001c0 = 0; *(uint8_t*)0x200001c1 = 0; *(uint8_t*)0x200001c2 = 0; *(uint8_t*)0x200001c3 = 0; *(uint8_t*)0x200001c4 = 0; *(uint8_t*)0x200001c5 = 0; *(uint8_t*)0x200001c6 = 0; *(uint8_t*)0x200001c7 = 0; *(uint8_t*)0x200001c8 = 0; *(uint8_t*)0x200001c9 = 0; *(uint8_t*)0x200001ca = 0; *(uint8_t*)0x200001cb = 0; *(uint8_t*)0x200001cc = 0; *(uint8_t*)0x200001cd = 0; *(uint8_t*)0x200001ce = 0; *(uint8_t*)0x200001cf = 0; *(uint8_t*)0x200001d0 = 0; *(uint8_t*)0x200001d1 = 0; *(uint8_t*)0x200001d2 = 0; *(uint8_t*)0x200001d3 = 0; *(uint8_t*)0x200001d4 = 0; *(uint8_t*)0x200001d5 = 0; *(uint8_t*)0x200001d6 = 0; *(uint8_t*)0x200001d7 = 0; *(uint8_t*)0x200001d8 = 0; *(uint8_t*)0x200001d9 = 0; *(uint8_t*)0x200001da = 0; *(uint8_t*)0x200001db = 0; *(uint8_t*)0x200001dc = 0; *(uint8_t*)0x200001dd = 0; *(uint8_t*)0x200001de = 0; *(uint8_t*)0x200001df = 0; *(uint8_t*)0x200001e0 = 0; *(uint8_t*)0x200001e1 = 0; *(uint8_t*)0x200001e2 = 0; *(uint8_t*)0x200001e3 = 0; *(uint8_t*)0x200001e4 = 0; *(uint8_t*)0x200001e5 = 0; *(uint8_t*)0x200001e6 = 0; *(uint8_t*)0x200001e7 = 0; *(uint8_t*)0x200001e8 = 0; *(uint8_t*)0x200001e9 = 0; *(uint8_t*)0x200001ea = 0; *(uint8_t*)0x200001eb = 0; *(uint8_t*)0x200001ec = 0; *(uint8_t*)0x200001ed = 0; *(uint8_t*)0x200001ee = 0; *(uint8_t*)0x200001ef = 0; *(uint8_t*)0x200001f0 = 0; *(uint8_t*)0x200001f1 = 0; *(uint8_t*)0x200001f2 = 0; *(uint8_t*)0x200001f3 = 0; *(uint8_t*)0x200001f4 = 0; *(uint8_t*)0x200001f5 = 0; *(uint8_t*)0x200001f6 = 0; *(uint8_t*)0x200001f7 = 0; *(uint8_t*)0x200001f8 = 0; *(uint8_t*)0x200001f9 = 0; *(uint8_t*)0x200001fa = 0; *(uint8_t*)0x200001fb = 0; *(uint8_t*)0x200001fc = 0; *(uint8_t*)0x200001fd = 0; *(uint8_t*)0x200001fe = 0; *(uint8_t*)0x200001ff = 0; *(uint8_t*)0x20000200 = 0; *(uint8_t*)0x20000201 = 0; *(uint8_t*)0x20000202 = 0; *(uint8_t*)0x20000203 = 0; *(uint8_t*)0x20000204 = 0; *(uint8_t*)0x20000205 = 0; *(uint8_t*)0x20000206 = 0; *(uint8_t*)0x20000207 = 0; *(uint8_t*)0x20000208 = 0; *(uint8_t*)0x20000209 = 0; *(uint8_t*)0x2000020a = 0; *(uint8_t*)0x2000020b = 0; *(uint8_t*)0x2000020c = 0; *(uint8_t*)0x2000020d = 0; *(uint8_t*)0x2000020e = 0; *(uint8_t*)0x2000020f = 0; *(uint8_t*)0x20000210 = 0; *(uint8_t*)0x20000211 = 0; *(uint8_t*)0x20000212 = 0; *(uint8_t*)0x20000213 = 0; *(uint8_t*)0x20000214 = 0; *(uint8_t*)0x20000215 = 0; *(uint8_t*)0x20000216 = 0; *(uint8_t*)0x20000217 = 0; *(uint8_t*)0x20000218 = 0; *(uint8_t*)0x20000219 = 0; *(uint8_t*)0x2000021a = 0; *(uint8_t*)0x2000021b = 0; *(uint8_t*)0x2000021c = 0; *(uint8_t*)0x2000021d = 0; *(uint8_t*)0x2000021e = 0; *(uint8_t*)0x2000021f = 0; *(uint8_t*)0x20000220 = 0; *(uint8_t*)0x20000221 = 0; *(uint8_t*)0x20000222 = 0; *(uint8_t*)0x20000223 = 0; *(uint8_t*)0x20000224 = 0; *(uint8_t*)0x20000225 = 0; *(uint8_t*)0x20000226 = 0; *(uint8_t*)0x20000227 = 0; *(uint32_t*)0x20000228 = 0; *(uint16_t*)0x2000022c = 0xa8; *(uint16_t*)0x2000022e = 0x108; *(uint32_t*)0x20000230 = 0; *(uint64_t*)0x20000238 = 0; *(uint64_t*)0x20000240 = 0; *(uint16_t*)0x20000248 = 0x60; memcpy((void*)0x2000024a, "HMARK\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000", 29); *(uint8_t*)0x20000267 = 0; *(uint32_t*)0x20000268 = htobe32(-1); *(uint32_t*)0x20000278 = htobe32(0); *(uint32_t*)0x2000027c = htobe32(0); *(uint32_t*)0x20000280 = htobe32(0); *(uint32_t*)0x20000284 = htobe32(0); *(uint16_t*)0x20000288 = htobe16(0); *(uint16_t*)0x2000028a = htobe16(0); *(uint16_t*)0x2000028c = htobe16(0); *(uint16_t*)0x2000028e = htobe16(0); *(uint32_t*)0x20000290 = 0; *(uint16_t*)0x20000294 = 0; *(uint32_t*)0x20000298 = 0; *(uint32_t*)0x2000029c = 4; *(uint32_t*)0x200002a0 = 0; *(uint8_t*)0x200002a8 = 0; *(uint8_t*)0x200002a9 = 0; *(uint8_t*)0x200002aa = 0; *(uint8_t*)0x200002ab = 0; *(uint8_t*)0x200002ac = 0; *(uint8_t*)0x200002ad = 0; *(uint8_t*)0x200002ae = 0; *(uint8_t*)0x200002af = 0; *(uint8_t*)0x200002b0 = 0; *(uint8_t*)0x200002b1 = 0; *(uint8_t*)0x200002b2 = 0; *(uint8_t*)0x200002b3 = 0; *(uint8_t*)0x200002b4 = 0; *(uint8_t*)0x200002b5 = 0; *(uint8_t*)0x200002b6 = 0; *(uint8_t*)0x200002b7 = 0; *(uint8_t*)0x200002b8 = 0; *(uint8_t*)0x200002b9 = 0; *(uint8_t*)0x200002ba = 0; *(uint8_t*)0x200002bb = 0; *(uint8_t*)0x200002bc = 0; *(uint8_t*)0x200002bd = 0; *(uint8_t*)0x200002be = 0; *(uint8_t*)0x200002bf = 0; *(uint8_t*)0x200002c0 = 0; *(uint8_t*)0x200002c1 = 0; *(uint8_t*)0x200002c2 = 0; *(uint8_t*)0x200002c3 = 0; *(uint8_t*)0x200002c4 = 0; *(uint8_t*)0x200002c5 = 0; *(uint8_t*)0x200002c6 = 0; *(uint8_t*)0x200002c7 = 0; *(uint8_t*)0x200002c8 = 0; *(uint8_t*)0x200002c9 = 0; *(uint8_t*)0x200002ca = 0; *(uint8_t*)0x200002cb = 0; *(uint8_t*)0x200002cc = 0; *(uint8_t*)0x200002cd = 0; *(uint8_t*)0x200002ce = 0; *(uint8_t*)0x200002cf = 0; *(uint8_t*)0x200002d0 = 0; *(uint8_t*)0x200002d1 = 0; *(uint8_t*)0x200002d2 = 0; *(uint8_t*)0x200002d3 = 0; *(uint8_t*)0x200002d4 = 0; *(uint8_t*)0x200002d5 = 0; *(uint8_t*)0x200002d6 = 0; *(uint8_t*)0x200002d7 = 0; *(uint8_t*)0x200002d8 = 0; *(uint8_t*)0x200002d9 = 0; *(uint8_t*)0x200002da = 0; *(uint8_t*)0x200002db = 0; *(uint8_t*)0x200002dc = 0; *(uint8_t*)0x200002dd = 0; *(uint8_t*)0x200002de = 0; *(uint8_t*)0x200002df = 0; *(uint8_t*)0x200002e0 = 0; *(uint8_t*)0x200002e1 = 0; *(uint8_t*)0x200002e2 = 0; *(uint8_t*)0x200002e3 = 0; *(uint8_t*)0x200002e4 = 0; *(uint8_t*)0x200002e5 = 0; *(uint8_t*)0x200002e6 = 0; *(uint8_t*)0x200002e7 = 0; *(uint8_t*)0x200002e8 = 0; *(uint8_t*)0x200002e9 = 0; *(uint8_t*)0x200002ea = 0; *(uint8_t*)0x200002eb = 0; *(uint8_t*)0x200002ec = 0; *(uint8_t*)0x200002ed = 0; *(uint8_t*)0x200002ee = 0; *(uint8_t*)0x200002ef = 0; *(uint8_t*)0x200002f0 = 0; *(uint8_t*)0x200002f1 = 0; *(uint8_t*)0x200002f2 = 0; *(uint8_t*)0x200002f3 = 0; *(uint8_t*)0x200002f4 = 0; *(uint8_t*)0x200002f5 = 0; *(uint8_t*)0x200002f6 = 0; *(uint8_t*)0x200002f7 = 0; *(uint8_t*)0x200002f8 = 0; *(uint8_t*)0x200002f9 = 0; *(uint8_t*)0x200002fa = 0; *(uint8_t*)0x200002fb = 0; *(uint8_t*)0x200002fc = 0; *(uint8_t*)0x200002fd = 0; *(uint8_t*)0x200002fe = 0; *(uint8_t*)0x200002ff = 0; *(uint8_t*)0x20000300 = 0; *(uint8_t*)0x20000301 = 0; *(uint8_t*)0x20000302 = 0; *(uint8_t*)0x20000303 = 0; *(uint8_t*)0x20000304 = 0; *(uint8_t*)0x20000305 = 0; *(uint8_t*)0x20000306 = 0; *(uint8_t*)0x20000307 = 0; *(uint8_t*)0x20000308 = 0; *(uint8_t*)0x20000309 = 0; *(uint8_t*)0x2000030a = 0; *(uint8_t*)0x2000030b = 0; *(uint8_t*)0x2000030c = 0; *(uint8_t*)0x2000030d = 0; *(uint8_t*)0x2000030e = 0; *(uint8_t*)0x2000030f = 0; *(uint8_t*)0x20000310 = 0; *(uint8_t*)0x20000311 = 0; *(uint8_t*)0x20000312 = 0; *(uint8_t*)0x20000313 = 0; *(uint8_t*)0x20000314 = 0; *(uint8_t*)0x20000315 = 0; *(uint8_t*)0x20000316 = 0; *(uint8_t*)0x20000317 = 0; *(uint8_t*)0x20000318 = 0; *(uint8_t*)0x20000319 = 0; *(uint8_t*)0x2000031a = 0; *(uint8_t*)0x2000031b = 0; *(uint8_t*)0x2000031c = 0; *(uint8_t*)0x2000031d = 0; *(uint8_t*)0x2000031e = 0; *(uint8_t*)0x2000031f = 0; *(uint8_t*)0x20000320 = 0; *(uint8_t*)0x20000321 = 0; *(uint8_t*)0x20000322 = 0; *(uint8_t*)0x20000323 = 0; *(uint8_t*)0x20000324 = 0; *(uint8_t*)0x20000325 = 0; *(uint8_t*)0x20000326 = 0; *(uint8_t*)0x20000327 = 0; *(uint8_t*)0x20000328 = 0; *(uint8_t*)0x20000329 = 0; *(uint8_t*)0x2000032a = 0; *(uint8_t*)0x2000032b = 0; *(uint8_t*)0x2000032c = 0; *(uint8_t*)0x2000032d = 0; *(uint8_t*)0x2000032e = 0; *(uint8_t*)0x2000032f = 0; *(uint32_t*)0x20000330 = 0; *(uint16_t*)0x20000334 = 0xa8; *(uint16_t*)0x20000336 = 0xf0; *(uint32_t*)0x20000338 = 0; *(uint64_t*)0x20000340 = 0; *(uint64_t*)0x20000348 = 0; *(uint16_t*)0x20000350 = 0x48; memcpy((void*)0x20000352, "TEE\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", 29); *(uint8_t*)0x2000036f = 1; *(uint8_t*)0x20000370 = -1; *(uint8_t*)0x20000371 = 2; *(uint8_t*)0x20000372 = 0; *(uint8_t*)0x20000373 = 0; *(uint8_t*)0x20000374 = 0; *(uint8_t*)0x20000375 = 0; *(uint8_t*)0x20000376 = 0; *(uint8_t*)0x20000377 = 0; *(uint8_t*)0x20000378 = 0; *(uint8_t*)0x20000379 = 0; *(uint8_t*)0x2000037a = 0; *(uint8_t*)0x2000037b = 0; *(uint8_t*)0x2000037c = 0; *(uint8_t*)0x2000037d = 0; *(uint8_t*)0x2000037e = 0; *(uint8_t*)0x2000037f = 1; memcpy((void*)0x20000380, "netdevsim0\000\000\000\000\000\000", 16); *(uint64_t*)0x20000390 = 0; *(uint8_t*)0x20000398 = 0xfe; *(uint8_t*)0x20000399 = 0x80; *(uint8_t*)0x2000039a = 0; *(uint8_t*)0x2000039b = 0; *(uint8_t*)0x2000039c = 0; *(uint8_t*)0x2000039d = 0; *(uint8_t*)0x2000039e = 0; *(uint8_t*)0x2000039f = 0; *(uint8_t*)0x200003a0 = 0; *(uint8_t*)0x200003a1 = 0; *(uint8_t*)0x200003a2 = 0; *(uint8_t*)0x200003a3 = 0; *(uint8_t*)0x200003a4 = 0; *(uint8_t*)0x200003a5 = 0; *(uint8_t*)0x200003a6 = 0; *(uint8_t*)0x200003a7 = 0xaa; *(uint8_t*)0x200003a8 = 0xfe; *(uint8_t*)0x200003a9 = 0x80; *(uint8_t*)0x200003aa = 0; *(uint8_t*)0x200003ab = 0; *(uint8_t*)0x200003ac = 0; *(uint8_t*)0x200003ad = 0; *(uint8_t*)0x200003ae = 0; *(uint8_t*)0x200003af = 0; *(uint8_t*)0x200003b0 = 0; *(uint8_t*)0x200003b1 = 0; *(uint8_t*)0x200003b2 = 0; *(uint8_t*)0x200003b3 = 0; *(uint8_t*)0x200003b4 = 0; *(uint8_t*)0x200003b5 = 0; *(uint8_t*)0x200003b6 = 0; *(uint8_t*)0x200003b7 = 0; *(uint32_t*)0x200003b8 = htobe32(0); *(uint32_t*)0x200003bc = htobe32(0); *(uint32_t*)0x200003c0 = htobe32(0); *(uint32_t*)0x200003c4 = htobe32(0); *(uint32_t*)0x200003c8 = htobe32(0); *(uint32_t*)0x200003cc = htobe32(0); *(uint32_t*)0x200003d0 = htobe32(0); *(uint32_t*)0x200003d4 = htobe32(0); memcpy((void*)0x200003d8, "vlan1\000\000\000\000\000\000\000\000\000\000\000", 16); memcpy((void*)0x200003e8, "ipvlan0\000\000\000\000\000\000\000\000\000", 16); *(uint8_t*)0x200003f8 = 0; *(uint8_t*)0x20000408 = 0; *(uint16_t*)0x20000418 = 0x11; *(uint8_t*)0x2000041a = 0; *(uint8_t*)0x2000041b = 0; *(uint8_t*)0x2000041c = 0; *(uint32_t*)0x20000420 = 0; *(uint16_t*)0x20000424 = 0xd8; *(uint16_t*)0x20000426 = 0x100; *(uint32_t*)0x20000428 = 0; *(uint64_t*)0x20000430 = 0; *(uint64_t*)0x20000438 = 0; *(uint16_t*)0x20000440 = 0x30; memcpy((void*)0x20000442, "l2tp\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", 29); *(uint8_t*)0x2000045f = 0; *(uint32_t*)0x20000460 = 0; *(uint32_t*)0x20000464 = 0; *(uint8_t*)0x20000468 = 2; *(uint8_t*)0x20000469 = 0; *(uint8_t*)0x2000046a = 0xc; *(uint16_t*)0x20000470 = 0x28; memcpy((void*)0x20000472, "REJECT\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" "\000\000\000\000\000\000\000\000", 29); *(uint8_t*)0x2000048f = 0; *(uint32_t*)0x20000490 = 0; *(uint8_t*)0x20000498 = 0; *(uint8_t*)0x20000499 = 0; *(uint8_t*)0x2000049a = 0; *(uint8_t*)0x2000049b = 0; *(uint8_t*)0x2000049c = 0; *(uint8_t*)0x2000049d = 0; *(uint8_t*)0x2000049e = 0; *(uint8_t*)0x2000049f = 0; *(uint8_t*)0x200004a0 = 0; *(uint8_t*)0x200004a1 = 0; *(uint8_t*)0x200004a2 = 0; *(uint8_t*)0x200004a3 = 0; *(uint8_t*)0x200004a4 = 0; *(uint8_t*)0x200004a5 = 0; *(uint8_t*)0x200004a6 = 0; *(uint8_t*)0x200004a7 = 0; *(uint8_t*)0x200004a8 = 0; *(uint8_t*)0x200004a9 = 0; *(uint8_t*)0x200004aa = 0; *(uint8_t*)0x200004ab = 0; *(uint8_t*)0x200004ac = 0; *(uint8_t*)0x200004ad = 0; *(uint8_t*)0x200004ae = 0; *(uint8_t*)0x200004af = 0; *(uint8_t*)0x200004b0 = 0; *(uint8_t*)0x200004b1 = 0; *(uint8_t*)0x200004b2 = 0; *(uint8_t*)0x200004b3 = 0; *(uint8_t*)0x200004b4 = 0; *(uint8_t*)0x200004b5 = 0; *(uint8_t*)0x200004b6 = 0; *(uint8_t*)0x200004b7 = 0; *(uint8_t*)0x200004b8 = 0; *(uint8_t*)0x200004b9 = 0; *(uint8_t*)0x200004ba = 0; *(uint8_t*)0x200004bb = 0; *(uint8_t*)0x200004bc = 0; *(uint8_t*)0x200004bd = 0; *(uint8_t*)0x200004be = 0; *(uint8_t*)0x200004bf = 0; *(uint8_t*)0x200004c0 = 0; *(uint8_t*)0x200004c1 = 0; *(uint8_t*)0x200004c2 = 0; *(uint8_t*)0x200004c3 = 0; *(uint8_t*)0x200004c4 = 0; *(uint8_t*)0x200004c5 = 0; *(uint8_t*)0x200004c6 = 0; *(uint8_t*)0x200004c7 = 0; *(uint8_t*)0x200004c8 = 0; *(uint8_t*)0x200004c9 = 0; *(uint8_t*)0x200004ca = 0; *(uint8_t*)0x200004cb = 0; *(uint8_t*)0x200004cc = 0; *(uint8_t*)0x200004cd = 0; *(uint8_t*)0x200004ce = 0; *(uint8_t*)0x200004cf = 0; *(uint8_t*)0x200004d0 = 0; *(uint8_t*)0x200004d1 = 0; *(uint8_t*)0x200004d2 = 0; *(uint8_t*)0x200004d3 = 0; *(uint8_t*)0x200004d4 = 0; *(uint8_t*)0x200004d5 = 0; *(uint8_t*)0x200004d6 = 0; *(uint8_t*)0x200004d7 = 0; *(uint8_t*)0x200004d8 = 0; *(uint8_t*)0x200004d9 = 0; *(uint8_t*)0x200004da = 0; *(uint8_t*)0x200004db = 0; *(uint8_t*)0x200004dc = 0; *(uint8_t*)0x200004dd = 0; *(uint8_t*)0x200004de = 0; *(uint8_t*)0x200004df = 0; *(uint8_t*)0x200004e0 = 0; *(uint8_t*)0x200004e1 = 0; *(uint8_t*)0x200004e2 = 0; *(uint8_t*)0x200004e3 = 0; *(uint8_t*)0x200004e4 = 0; *(uint8_t*)0x200004e5 = 0; *(uint8_t*)0x200004e6 = 0; *(uint8_t*)0x200004e7 = 0; *(uint8_t*)0x200004e8 = 0; *(uint8_t*)0x200004e9 = 0; *(uint8_t*)0x200004ea = 0; *(uint8_t*)0x200004eb = 0; *(uint8_t*)0x200004ec = 0; *(uint8_t*)0x200004ed = 0; *(uint8_t*)0x200004ee = 0; *(uint8_t*)0x200004ef = 0; *(uint8_t*)0x200004f0 = 0; *(uint8_t*)0x200004f1 = 0; *(uint8_t*)0x200004f2 = 0; *(uint8_t*)0x200004f3 = 0; *(uint8_t*)0x200004f4 = 0; *(uint8_t*)0x200004f5 = 0; *(uint8_t*)0x200004f6 = 0; *(uint8_t*)0x200004f7 = 0; *(uint8_t*)0x200004f8 = 0; *(uint8_t*)0x200004f9 = 0; *(uint8_t*)0x200004fa = 0; *(uint8_t*)0x200004fb = 0; *(uint8_t*)0x200004fc = 0; *(uint8_t*)0x200004fd = 0; *(uint8_t*)0x200004fe = 0; *(uint8_t*)0x200004ff = 0; *(uint8_t*)0x20000500 = 0; *(uint8_t*)0x20000501 = 0; *(uint8_t*)0x20000502 = 0; *(uint8_t*)0x20000503 = 0; *(uint8_t*)0x20000504 = 0; *(uint8_t*)0x20000505 = 0; *(uint8_t*)0x20000506 = 0; *(uint8_t*)0x20000507 = 0; *(uint8_t*)0x20000508 = 0; *(uint8_t*)0x20000509 = 0; *(uint8_t*)0x2000050a = 0; *(uint8_t*)0x2000050b = 0; *(uint8_t*)0x2000050c = 0; *(uint8_t*)0x2000050d = 0; *(uint8_t*)0x2000050e = 0; *(uint8_t*)0x2000050f = 0; *(uint8_t*)0x20000510 = 0; *(uint8_t*)0x20000511 = 0; *(uint8_t*)0x20000512 = 0; *(uint8_t*)0x20000513 = 0; *(uint8_t*)0x20000514 = 0; *(uint8_t*)0x20000515 = 0; *(uint8_t*)0x20000516 = 0; *(uint8_t*)0x20000517 = 0; *(uint8_t*)0x20000518 = 0; *(uint8_t*)0x20000519 = 0; *(uint8_t*)0x2000051a = 0; *(uint8_t*)0x2000051b = 0; *(uint8_t*)0x2000051c = 0; *(uint8_t*)0x2000051d = 0; *(uint8_t*)0x2000051e = 0; *(uint8_t*)0x2000051f = 0; *(uint32_t*)0x20000520 = 0; *(uint16_t*)0x20000524 = 0xa8; *(uint16_t*)0x20000526 = 0xd0; *(uint32_t*)0x20000528 = 0; *(uint64_t*)0x20000530 = 0; *(uint64_t*)0x20000538 = 0; *(uint16_t*)0x20000540 = 0x28; memcpy((void*)0x20000542, "\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", 29); *(uint8_t*)0x2000055f = 0; *(uint32_t*)0x20000560 = 0xfffffffe; syscall(__NR_setsockopt, r[0], 0x29, 0x40, 0x20000140ul, 0x428ul); res = syscall(__NR_socket, 0x10ul, 3ul, 0xc); if (res != -1) r[1] = res; *(uint64_t*)0x200000c0 = 0; *(uint32_t*)0x200000c8 = 0; *(uint64_t*)0x200000d0 = 0x20000080; *(uint64_t*)0x20000080 = 0x20000040; *(uint32_t*)0x20000040 = 0x30; *(uint8_t*)0x20000044 = 0; *(uint8_t*)0x20000045 = 0xb; *(uint16_t*)0x20000046 = 0x401; *(uint32_t*)0x20000048 = 0; *(uint32_t*)0x2000004c = 0; *(uint8_t*)0x20000050 = 7; *(uint8_t*)0x20000051 = 0; *(uint16_t*)0x20000052 = htobe16(0); *(uint16_t*)0x20000054 = 8; STORE_BY_BITMASK(uint16_t, , 0x20000056, 2, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x20000057, 1, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x20000057, 0, 7, 1); *(uint32_t*)0x20000058 = htobe32(0); *(uint16_t*)0x2000005c = 8; STORE_BY_BITMASK(uint16_t, , 0x2000005e, 3, 0, 14); STORE_BY_BITMASK(uint16_t, , 0x2000005f, 1, 6, 1); STORE_BY_BITMASK(uint16_t, , 0x2000005f, 0, 7, 1); *(uint32_t*)0x20000060 = htobe32(1); *(uint16_t*)0x20000064 = 9; *(uint16_t*)0x20000066 = 1; memcpy((void*)0x20000068, "@])^\000", 5); *(uint64_t*)0x20000088 = 0x30; *(uint64_t*)0x200000d8 = 1; *(uint64_t*)0x200000e0 = 0; *(uint64_t*)0x200000e8 = 0; *(uint32_t*)0x200000f0 = 0; syscall(__NR_sendmsg, r[1], 0x200000c0ul, 0ul); } int main(void) { syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul); syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul); loop(); return 0; }