| // general protection fault in tipc_sk_fill_sock_diag |
| // https://syzkaller.appspot.com/bug?id=e3403f3fa48c990996e20bdb83b1758b1ee424f8 |
| // status:fixed |
| // autogenerated by syzkaller (http://github.com/google/syzkaller) |
| |
| #define _GNU_SOURCE |
| #include <endian.h> |
| #include <stdint.h> |
| #include <string.h> |
| #include <sys/syscall.h> |
| #include <unistd.h> |
| |
| uint64_t r[1] = {0xffffffffffffffff}; |
| void loop() |
| { |
| long res; |
| res = syscall(__NR_socket, 0x10, 3, 4); |
| if (res != -1) |
| r[0] = res; |
| *(uint64_t*)0x20005000 = 0x20000000; |
| *(uint16_t*)0x20000000 = 0x10; |
| *(uint16_t*)0x20000002 = 0; |
| *(uint32_t*)0x20000004 = 0; |
| *(uint32_t*)0x20000008 = 0; |
| *(uint32_t*)0x20005008 = 0xc; |
| *(uint64_t*)0x20005010 = 0x200000c0; |
| *(uint64_t*)0x200000c0 = 0x20000080; |
| *(uint32_t*)0x20000080 = 0x34; |
| *(uint16_t*)0x20000084 = 0x14; |
| *(uint16_t*)0x20000086 = 0x301; |
| *(uint32_t*)0x20000088 = 0; |
| *(uint32_t*)0x2000008c = 0; |
| *(uint8_t*)0x20000090 = 0x1e; |
| *(uint8_t*)0x20000091 = 0; |
| *(uint16_t*)0x20000092 = 0; |
| memcpy((void*)0x20000094, "\x64\x85\xd8\xb5\xe8\xe6\x5d\xf7\x28\xc4\x3e\xda" |
| "\x80\x5c\x71\x1d\xcb\x7c\xd4\x84\x7b\x69\x35", |
| 23); |
| *(uint16_t*)0x200000ab = 8; |
| *(uint16_t*)0x200000ad = 0x95; |
| *(uint32_t*)0x200000af = 9; |
| *(uint64_t*)0x200000c8 = 0x34; |
| *(uint64_t*)0x20005018 = 1; |
| *(uint64_t*)0x20005020 = 0; |
| *(uint64_t*)0x20005028 = 0; |
| *(uint32_t*)0x20005030 = 0; |
| syscall(__NR_sendmsg, r[0], 0x20005000, 0); |
| } |
| |
| int main() |
| { |
| syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); |
| loop(); |
| return 0; |
| } |