| // general protection fault in scatterwalk_copychunks (2) |
| // https://syzkaller.appspot.com/bug?id=1fd1d44caf96ca464e1c1f19299d1f3e7558f6e5 |
| // status:fixed |
| // autogenerated by syzkaller (http://github.com/google/syzkaller) |
| |
| #define _GNU_SOURCE |
| |
| #include <sys/syscall.h> |
| #include <unistd.h> |
| |
| #include <stdint.h> |
| #include <string.h> |
| |
| static void test(); |
| |
| void loop() |
| { |
| while (1) { |
| test(); |
| } |
| } |
| |
| long r[2]; |
| void test() |
| { |
| memset(r, -1, sizeof(r)); |
| syscall(__NR_mmap, 0x20000000ul, 0xfff000ul, 0x3ul, 0x32ul, |
| 0xfffffffffffffffful, 0x0ul); |
| r[0] = syscall(__NR_socket, 0x26ul, 0x5ul, 0x0ul); |
| *(uint16_t*)0x20f74000 = (uint16_t)0x26; |
| memcpy((void*)0x20f74002, |
| "\x61\x65\x61\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", |
| 14); |
| *(uint32_t*)0x20f74010 = (uint32_t)0xffffffffffffffff; |
| *(uint32_t*)0x20f74014 = (uint32_t)0x0; |
| memcpy((void*)0x20f74018, |
| "\x72\x66\x63\x37\x35\x33\x39\x28\x63\x68\x61\x63\x68\x61\x32" |
| "\x30\x2d\x67\x65\x6e\x65\x72\x69\x63\x2c\x73\x6d\x33\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", |
| 64); |
| syscall(__NR_bind, r[0], 0x20f74000ul, 0x58ul); |
| memcpy((void*)0x206d5000, "\x0a\x07\x75\xb7\xca\xe3\x83\xe5\xb3\xb6" |
| "\xad\xed\x5c\x54\xd6\x29\x5d\xf0\xdf\x82" |
| "\x18\x0c\x0d\xeb\x00\x00\x1f\x08\x00\x00" |
| "\x02\xff", |
| 32); |
| syscall(__NR_setsockopt, r[0], 0x117ul, 0x1ul, 0x206d5000ul, 0x20ul); |
| r[1] = syscall(__NR_accept, r[0], 0x0ul, 0x0ul); |
| *(uint64_t*)0x20f74fc8 = (uint64_t)0x0; |
| *(uint32_t*)0x20f74fd0 = (uint32_t)0x0; |
| *(uint64_t*)0x20f74fd8 = (uint64_t)0x20f74000; |
| *(uint64_t*)0x20f74fe0 = (uint64_t)0x1; |
| *(uint64_t*)0x20f74fe8 = (uint64_t)0x207e0000; |
| *(uint64_t*)0x20f74ff0 = (uint64_t)0x18; |
| *(uint32_t*)0x20f74ff8 = (uint32_t)0x0; |
| *(uint64_t*)0x20f74000 = (uint64_t)0x2004b000; |
| *(uint64_t*)0x20f74008 = (uint64_t)0x0; |
| *(uint64_t*)0x207e0000 = (uint64_t)0x18; |
| *(uint32_t*)0x207e0008 = (uint32_t)0x117; |
| *(uint32_t*)0x207e000c = (uint32_t)0x3; |
| *(uint32_t*)0x207e0010 = (uint32_t)0x1; |
| syscall(__NR_sendmsg, r[1], 0x20f74fc8ul, 0x0ul); |
| *(uint64_t*)0x20c0c000 = (uint64_t)0x20f76000; |
| *(uint32_t*)0x20c0c008 = (uint32_t)0x80; |
| *(uint64_t*)0x20c0c010 = (uint64_t)0x20b10000; |
| *(uint64_t*)0x20c0c018 = (uint64_t)0x1; |
| *(uint64_t*)0x20c0c020 = (uint64_t)0x20381000; |
| *(uint64_t*)0x20c0c028 = (uint64_t)0x0; |
| *(uint32_t*)0x20c0c030 = (uint32_t)0x0; |
| *(uint64_t*)0x20b10000 = (uint64_t)0x20d25f96; |
| *(uint64_t*)0x20b10008 = (uint64_t)0x40; |
| syscall(__NR_recvmsg, r[1], 0x20c0c000ul, 0x0ul); |
| } |
| |
| int main() |
| { |
| loop(); |
| return 0; |
| } |