| // WARNING in hfs_bnode_create |
| // https://syzkaller.appspot.com/bug?id=04e95388a1b71c0e15b667b54b34ad3a60a9d933 |
| // status:open |
| // autogenerated by syzkaller (http://github.com/google/syzkaller) |
| |
| #define _GNU_SOURCE |
| #include <endian.h> |
| #include <errno.h> |
| #include <fcntl.h> |
| #include <linux/loop.h> |
| #include <stdint.h> |
| #include <stdio.h> |
| #include <string.h> |
| #include <sys/ioctl.h> |
| #include <sys/mount.h> |
| #include <sys/stat.h> |
| #include <sys/syscall.h> |
| #include <sys/types.h> |
| #include <unistd.h> |
| |
| extern unsigned long long procid; |
| |
| struct fs_image_segment { |
| void* data; |
| uintptr_t size; |
| uintptr_t offset; |
| }; |
| |
| #define IMAGE_MAX_SEGMENTS 4096 |
| #define IMAGE_MAX_SIZE (32 << 20) |
| |
| #define SYZ_memfd_create 319 |
| |
| static uintptr_t syz_mount_image(uintptr_t fs, uintptr_t dir, uintptr_t size, |
| uintptr_t nsegs, uintptr_t segments, |
| uintptr_t flags, uintptr_t opts) |
| { |
| char loopname[64]; |
| int loopfd, err = 0, res = -1; |
| uintptr_t i; |
| struct fs_image_segment* segs = (struct fs_image_segment*)segments; |
| |
| if (nsegs > IMAGE_MAX_SEGMENTS) |
| nsegs = IMAGE_MAX_SEGMENTS; |
| for (i = 0; i < nsegs; i++) { |
| if (segs[i].size > IMAGE_MAX_SIZE) |
| segs[i].size = IMAGE_MAX_SIZE; |
| segs[i].offset %= IMAGE_MAX_SIZE; |
| if (segs[i].offset > IMAGE_MAX_SIZE - segs[i].size) |
| segs[i].offset = IMAGE_MAX_SIZE - segs[i].size; |
| if (size < segs[i].offset + segs[i].offset) |
| size = segs[i].offset + segs[i].offset; |
| } |
| if (size > IMAGE_MAX_SIZE) |
| size = IMAGE_MAX_SIZE; |
| int memfd = syscall(SYZ_memfd_create, "syz_mount_image", 0); |
| if (memfd == -1) { |
| err = errno; |
| goto error; |
| } |
| if (ftruncate(memfd, size)) { |
| err = errno; |
| goto error_close_memfd; |
| } |
| for (i = 0; i < nsegs; i++) { |
| if (pwrite(memfd, segs[i].data, segs[i].size, segs[i].offset) < 0) { |
| } |
| } |
| snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); |
| loopfd = open(loopname, O_RDWR); |
| if (loopfd == -1) { |
| err = errno; |
| goto error_close_memfd; |
| } |
| if (ioctl(loopfd, LOOP_SET_FD, memfd)) { |
| if (errno != EBUSY) { |
| err = errno; |
| goto error_close_loop; |
| } |
| ioctl(loopfd, LOOP_CLR_FD, 0); |
| usleep(1000); |
| if (ioctl(loopfd, LOOP_SET_FD, memfd)) { |
| err = errno; |
| goto error_close_loop; |
| } |
| } |
| mkdir((char*)dir, 0777); |
| if (strcmp((char*)fs, "iso9660") == 0) |
| flags |= MS_RDONLY; |
| if (mount(loopname, (char*)dir, (char*)fs, flags, (char*)opts)) { |
| err = errno; |
| goto error_clear_loop; |
| } |
| res = 0; |
| error_clear_loop: |
| ioctl(loopfd, LOOP_CLR_FD, 0); |
| error_close_loop: |
| close(loopfd); |
| error_close_memfd: |
| close(memfd); |
| error: |
| errno = err; |
| return res; |
| } |
| |
| unsigned long long procid; |
| void loop() |
| { |
| memcpy((void*)0x20000000, "hfs", 4); |
| memcpy((void*)0x20000100, "./file0", 8); |
| *(uint64_t*)0x20000200 = 0x20010000; |
| memcpy((void*)0x20010000, |
| "\x42\x44\xd6\xe4\x2a\x80\xd6\xe4\x2a\x87\x01\x00\x00\x05\x00\x03\x00" |
| "\x00\x07\xfa\x00\x00\x02\x00\x00\x00\x08\x00\x00\x04\x00\x00\x00\x19" |
| "\x07\xd7\x08\x75\x6e\x74\x69\x74\x6c\x65\x64\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x03\x00\x00\x20\x00\x00\x00\x20\x00\x00\x02\x00" |
| "\x00\x00\x07\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x63\x6e\x65\x00\x00\x00\x00\x99\x3e\x05" |
| "\x12\xa4\xe8\xa2\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00" |
| "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x10\x00" |
| "\x10", |
| 154); |
| *(uint64_t*)0x20000208 = 0x9a; |
| *(uint64_t*)0x20000210 = 0x400; |
| *(uint64_t*)0x20000218 = 0x20010200; |
| memcpy((void*)0x20010200, "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x03" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x07" |
| "\x00\x00\x00\x10", |
| 40); |
| *(uint64_t*)0x20000220 = 0x28; |
| *(uint64_t*)0x20000228 = 0x800; |
| *(uint64_t*)0x20000230 = 0x20010500; |
| memcpy((void*)0x20010500, "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x03" |
| "\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x14" |
| "\x00\x00\x00\x01\x00\x00\x00\x06\x02\x00\x00\x25" |
| "\x00\x00\x00\x10\x00\x00\x00\x09", |
| 44); |
| *(uint64_t*)0x20000238 = 0x2c; |
| *(uint64_t*)0x20000240 = 0x2800; |
| *(uint64_t*)0x20000248 = 0x20010700; |
| memcpy( |
| (void*)0x20010700, |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x01\xf8\x00\xf8\x00\x78\x00\x0e\x00\x00\x00\x02" |
| "\x00\x00\x00\x00\xff\x01\x00\x03\x00\x00\x0f\x00\x00\x00\x00\x01\x08\x75" |
| "\x6e\x74\x69\x74\x6c\x65\x64\x00\x01\x00\x00\x00\x00\x07\x00\x00\x00\x02" |
| "\xd6\xe4\x2a\x80\xd6\xe4\x2a\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x02\x00\x00\x03\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x08\x75\x6e\x74\x69\x74\x6c\x65" |
| "\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x02\x05\x66\x69\x6c\x65\x30" |
| "\x02\x00\x82\x00\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x0a\x00\x00\x02\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\xd6\xe4\x2a\x86\xd6\xe4\x2a\x86\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x20\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x02" |
| "\x05\x66\x69\x6c\x65\x31\x01\x00\x00\x00\x00\x00\x00\x00\x00\x11\xd6\xe4" |
| "\x2a\x86\xd6\xe4\x2a\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x06\x00\x00\x00\x00\x10\x00\x00\x04\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x02\x05\x66\x69\x6c\x65\x30\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x06\x00\x00\x00\x00\x11\x00\x00\x03\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x02\x05\x66\x69\x6c\x65\x31\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", |
| 480); |
| *(uint64_t*)0x20000250 = 0x1e0; |
| *(uint64_t*)0x20000258 = 0x29e0; |
| *(uint64_t*)0x20000260 = 0x20010900; |
| memcpy( |
| (void*)0x20010900, |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x01\xca\x01\x94\x01\x5e\x01\x0c\x00\x9a\x00\x64\x00\x0e\x00\x00\x00\x05" |
| "\x00\x00\x00\x01\xff\x01\x00\x03\x00\x00\x0b\x00\x00\x00\x00\x02\x05\x66" |
| "\x69\x6c\x65\x31\x01\x00\x00\x00\x00\x01\x00\x00\x00\x11\xd6\xe4\x2a\x86" |
| "\xd6\xe4\x2a\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x0b\x00\x00\x00\x00\x02\x05\x66\x69\x6c\x65\x32\x02\x00\x83\x00" |
| "\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\xd6\xe4\x2a\x86\xd6\xe4\x2a\x86\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x02\x05\x66\x69\x6c" |
| "\x65\x33\x02\x00\x82\x00\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\xe4\x2a\x86\xd6\xe4\x2a\x86" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00" |
| "\x00\x10\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02" |
| "\x05\x66\x69\x6c\x65\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00" |
| "\x00\x11\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02" |
| "\x05\x66\x69\x6c\x65\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", |
| 448); |
| *(uint64_t*)0x20000268 = 0x1c0; |
| *(uint64_t*)0x20000270 = 0x2be0; |
| *(uint64_t*)0x20000278 = 0x20010b00; |
| memcpy((void*)0x20010b00, |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x01\xaa\x01\xb0\x01\x7a\x01\x44\x00\xd2\x00\x60\x00\x0e\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x02\x00\x05\x00\x00\x25\x00\x00\x00\x00" |
| "\x01\x08\x75\x6e\x74\x69\x74\x6c\x65\x64\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x01\x25\x00\x00\x00\x00\x02\x05\x66\x69\x6c\x65\x31\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x25\x00\x00\x00\x00\x02" |
| "\x05\x66\x69\x6c\x65\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x05\x25\x00\x00\x00\x00\x11\x05\x66\x69\x6c\x65\x30\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x25\x00\x00\x00\x00\x14\x00" |
| "\x66\x69\x6c\x65\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x06", |
| 256); |
| *(uint64_t*)0x20000280 = 0x100; |
| *(uint64_t*)0x20000288 = 0x2de0; |
| *(uint64_t*)0x20000290 = 0x20010c00; |
| memcpy( |
| (void*)0x20010c00, |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\xe0\x00\xb6\x00\x8c\x00\x62\x00\x38\x00\x0e\x00\x00\x00\x06" |
| "\x00\x00\x00\x05\xff\x01\x00\x03\x00\x00\x0b\x00\x00\x00\x00\x11\x05\x66" |
| "\x69\x6c\x65\x30\x02\x00\x82\x00\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x00\x00\x00\x00\x13\x00\x00" |
| "\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\xe4\x2a\x86\xd6\xe4" |
| "\x2a\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x21\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00" |
| "\x00\x00\x00\x12\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x11\x05\x66\x69\x6c\x65\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00" |
| "\x00\x00\x00\x13\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x02\x05\x66\x69\x6c\x65\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00" |
| "\x00\x00\x00\x14\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x02\x05\x66\x69\x6c\x65\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00" |
| "\x00\x00\x00\x15\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x02\x05\x66\x69\x6c\x65\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00" |
| "\x00\x00\x00\x16\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x02\x08\x56\x49\x44\x45\x4f\x5f\x54\x53\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00" |
| "\x00\x00\x00\x17\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x16\x05\x66\x69\x6c\x65\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", |
| 480); |
| *(uint64_t*)0x20000298 = 0x1e0; |
| *(uint64_t*)0x200002a0 = 0x2fe0; |
| *(uint64_t*)0x200002a8 = 0x20010e00; |
| memcpy( |
| (void*)0x20010e00, |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xc4" |
| "\x01\x8e\x01\x58\x01\x22\x00\xec\x00\xb6\x00\x80\x00\x0e\x00\x00\x00\x04" |
| "\x00\x00\x00\x02\xff\x01\x00\x05\x00\x00\x0b\x00\x00\x00\x00\x02\x05\x66" |
| "\x69\x6c\x65\x34\x02\x00\x82\x00\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\xe4\x2a\x86\xd6\xe4" |
| "\x2a\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00" |
| "\x00\x00\x00\x02\x08\x56\x49\x44\x45\x4f\x5f\x54\x53\x00\x01\x00\x00\x00" |
| "\x00\x01\x00\x00\x00\x16\xd6\xe4\x2a\x86\xd6\xe4\x2a\x86\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x02" |
| "\x12\xd1\x81\xd1\x8e\xd0\xb7\xd0\xba\xd0\xb0\xd0\xbb\xd0\xbb\xd0\xb5\xd1" |
| "\x80\x00\x02\x00\x82\x00\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x10\x00\x00\x02\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\xe4\x2a\x86\xd6\xe4\x2a\x86" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x22\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00" |
| "\x00\x10\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02" |
| "\x05\x66\x69\x6c\x65\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00" |
| "\x00\x11\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02" |
| "\x05\x66\x69\x6c\x65\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", |
| 480); |
| *(uint64_t*)0x200002b0 = 0x1e0; |
| *(uint64_t*)0x200002b8 = 0x31e0; |
| *(uint64_t*)0x200002c0 = 0x20011000; |
| memcpy( |
| (void*)0x20011000, |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x01\xc2\x01\x8c\x01\x56\x00\xd6\x00\x80\x00\x0e\x00\x00\x00\x00" |
| "\x00\x00\x00\x04\xff\x01\x00\x06\x00\x00\x06\x00\x00\x00\x00\x14\x00\x00" |
| "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x05\x66\x69\x6c" |
| "\x65\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x15\x00\x00" |
| "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x05\x66\x69\x6c" |
| "\x65\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x16\x00\x00" |
| "\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x08\x56\x49\x44" |
| "\x45\x4f\x5f\x54\x53\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00\x16\x05\x66" |
| "\x69\x6c\x65\x30\x02\x00\x82\x00\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x3f\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\xe4\x2a\x86\xd6\xe4" |
| "\x2a\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00" |
| "\x00\x00\x00\x17\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x16\x05\x66\x69\x6c\x65\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00" |
| "\x00\x00\x00\x18\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x02\x12\xd1\x81\xd1\x8e\xd0\xb7\xd0\xba\xd0\xb0\xd0\xbb\xd0\xbb\xd0" |
| "\xb5\xd1\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", |
| 448); |
| *(uint64_t*)0x200002c8 = 0x1c0; |
| *(uint64_t*)0x200002d0 = 0x33e0; |
| *(uint64_t*)0x200002d8 = 0x20011200; |
| memcpy((void*)0x20011200, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x01\x8e\x01\x58\x01\x22" |
| "\x00\xb0\x00\x7a\x00\x44\x00\x0e", |
| 32); |
| *(uint64_t*)0x200002e0 = 0x20; |
| *(uint64_t*)0x200002e8 = 0x35e0; |
| *(uint64_t*)0x200002f0 = 0x20011300; |
| *(uint64_t*)0x200002f8 = 0; |
| *(uint64_t*)0x20000300 = 0x4800; |
| *(uint64_t*)0x20000308 = 0x20011400; |
| *(uint64_t*)0x20000310 = 0; |
| *(uint64_t*)0x20000318 = 0x4a00; |
| *(uint64_t*)0x20000320 = 0x20011500; |
| *(uint64_t*)0x20000328 = 0; |
| *(uint64_t*)0x20000330 = 0x4c00; |
| *(uint64_t*)0x20000338 = 0x20011600; |
| *(uint64_t*)0x20000340 = 0; |
| *(uint64_t*)0x20000348 = 0xffc00; |
| *(uint8_t*)0x20011700 = 0; |
| syz_mount_image(0x20000000, 0x20000100, 0, 0xe, 0x20000200, 0, 0x20011700); |
| memcpy((void*)0x20000180, "./file0//ile0", 14); |
| syscall(__NR_mkdir, 0x20000180, 0x21); |
| } |
| |
| int main() |
| { |
| syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); |
| loop(); |
| return 0; |
| } |