| // general protection fault in ip6_datagram_dst_update |
| // https://syzkaller.appspot.com/bug?id=c580fc5378004988047cb13b9f312b3eaa44eda8 |
| // status:fixed |
| // autogenerated by syzkaller (https://github.com/google/syzkaller) |
| |
| #define _GNU_SOURCE |
| |
| #include <endian.h> |
| #include <stdint.h> |
| #include <stdio.h> |
| #include <stdlib.h> |
| #include <string.h> |
| #include <sys/syscall.h> |
| #include <sys/types.h> |
| #include <unistd.h> |
| |
| uint64_t r[1] = {0xffffffffffffffff}; |
| |
| int main(void) |
| { |
| syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); |
| intptr_t res = 0; |
| res = syscall(__NR_socket, 0xa, 3, 4); |
| if (res != -1) |
| r[0] = res; |
| *(uint8_t*)0x20000000 = 0xfe; |
| *(uint8_t*)0x20000001 = 0x80; |
| *(uint8_t*)0x20000002 = 0; |
| *(uint8_t*)0x20000003 = 0; |
| *(uint8_t*)0x20000004 = 0; |
| *(uint8_t*)0x20000005 = 0; |
| *(uint8_t*)0x20000006 = 0; |
| *(uint8_t*)0x20000007 = 0; |
| *(uint8_t*)0x20000008 = 0; |
| *(uint8_t*)0x20000009 = 0; |
| *(uint8_t*)0x2000000a = 0; |
| *(uint8_t*)0x2000000b = 0; |
| *(uint8_t*)0x2000000c = 0; |
| *(uint8_t*)0x2000000d = 0; |
| *(uint8_t*)0x2000000e = 0; |
| *(uint8_t*)0x2000000f = 0xaa; |
| *(uint32_t*)0x20000010 = 0; |
| *(uint8_t*)0x20000014 = 0; |
| *(uint8_t*)0x20000015 = 1; |
| *(uint16_t*)0x20000016 = 1; |
| *(uint16_t*)0x20000018 = 0; |
| *(uint16_t*)0x2000001a = 0; |
| *(uint32_t*)0x2000001c = 0; |
| syscall(__NR_setsockopt, r[0], 0x29, 0x20, 0x20000000, 0x20); |
| *(uint32_t*)0x20000140 = 0xfffffffe; |
| syscall(__NR_setsockopt, r[0], 0x29, 0x21, 0x20000140, 4); |
| *(uint16_t*)0x20000040 = 0xa; |
| *(uint16_t*)0x20000042 = htobe16(0); |
| *(uint32_t*)0x20000044 = htobe32(0x380000); |
| *(uint8_t*)0x20000048 = 0; |
| *(uint8_t*)0x20000049 = 0; |
| *(uint8_t*)0x2000004a = 0; |
| *(uint8_t*)0x2000004b = 0; |
| *(uint8_t*)0x2000004c = 0; |
| *(uint8_t*)0x2000004d = 0; |
| *(uint8_t*)0x2000004e = 0; |
| *(uint8_t*)0x2000004f = 0; |
| *(uint8_t*)0x20000050 = 0; |
| *(uint8_t*)0x20000051 = 0; |
| *(uint8_t*)0x20000052 = 0; |
| *(uint8_t*)0x20000053 = 0; |
| *(uint8_t*)0x20000054 = 0; |
| *(uint8_t*)0x20000055 = 0; |
| *(uint8_t*)0x20000056 = 0; |
| *(uint8_t*)0x20000057 = 0; |
| *(uint32_t*)0x20000058 = 0; |
| syscall(__NR_connect, r[0], 0x20000040, 0x1c); |
| return 0; |
| } |