| // KASAN: wild-memory-access Write in scatterwalk_copychunks |
| // https://syzkaller.appspot.com/bug?id=159d03c53cb4c57b1a3b2f29373271bc2536b4df |
| // status:fixed |
| // autogenerated by syzkaller (http://github.com/google/syzkaller) |
| |
| #define _GNU_SOURCE |
| |
| #include <endian.h> |
| #include <sys/syscall.h> |
| #include <unistd.h> |
| |
| #include <stdint.h> |
| #include <string.h> |
| |
| long r[2]; |
| void loop() |
| { |
| memset(r, -1, sizeof(r)); |
| syscall(__NR_mmap, 0x20000000, 0xf88000, 0x3, 0x32, 0xffffffff, 0x0); |
| r[0] = syscall(__NR_socket, 0x26, 0x5, 0x0); |
| *(uint16_t*)0x206be000 = 0x26; |
| memcpy((void*)0x206be002, |
| "\x61\x65\x61\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", |
| 14); |
| *(uint32_t*)0x206be010 = 0x0; |
| *(uint32_t*)0x206be014 = 0x1f; |
| memcpy((void*)0x206be018, |
| "\x72\x66\x63\x37\x35\x33\x39\x28\x63\x74\x72\x28\x74\x77\x6f" |
| "\x66\x69\x73\x68\x29\x2c\x73\x68\x61\x35\x31\x32\x2d\x67\x65" |
| "\x6e\x65\x72\x69\x63\x29\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", |
| 64); |
| syscall(__NR_bind, r[0], 0x206be000, 0x58); |
| memcpy((void*)0x201ec000, "\x0a\x07\x75\xb0\xd5\xe3\x83\xe5\xb3\xb6" |
| "\x0c\xed\x5c\x54\xdb\xb7\x29\x5d\xf0\xdf" |
| "\x82\x17\xad\x40\x00\x00\x00\x00\x00\x00" |
| "\x00\xe6", |
| 32); |
| syscall(__NR_setsockopt, r[0], 0x117, 0x1, 0x201ec000, 0x20); |
| r[1] = syscall(__NR_accept, r[0], 0x0, 0x0); |
| *(uint64_t*)0x20861fc8 = 0x0; |
| *(uint32_t*)0x20861fd0 = 0x0; |
| *(uint64_t*)0x20861fd8 = 0x202c4000; |
| *(uint64_t*)0x20861fe0 = 0x1; |
| *(uint64_t*)0x20861fe8 = 0x20f77000; |
| *(uint64_t*)0x20861ff0 = 0x0; |
| *(uint32_t*)0x20861ff8 = 0x0; |
| *(uint64_t*)0x202c4000 = 0x20f82000; |
| *(uint64_t*)0x202c4008 = 0x10; |
| memcpy((void*)0x20f82000, "\x91\x26\x9d\xf3\x22\xae\x38\x4b\xb8\xb8" |
| "\xc9\xd2\xf3\x68\x1e\x70", |
| 16); |
| syscall(__NR_sendmsg, r[1], 0x20861fc8, 0x0); |
| *(uint64_t*)0x2022efc8 = 0x20f74000; |
| *(uint32_t*)0x2022efd0 = 0x10; |
| *(uint64_t*)0x2022efd8 = 0x20892fb0; |
| *(uint64_t*)0x2022efe0 = 0x1; |
| *(uint64_t*)0x2022efe8 = 0x208adfba; |
| *(uint64_t*)0x2022eff0 = 0x46; |
| *(uint32_t*)0x2022eff8 = 0x0; |
| *(uint64_t*)0x20892fb0 = 0x2000bf7c; |
| *(uint64_t*)0x20892fb8 = 0x84; |
| syscall(__NR_recvmsg, r[1], 0x2022efc8, 0x0); |
| } |
| |
| int main() |
| { |
| loop(); |
| return 0; |
| } |