| // KASAN: slab-out-of-bounds Write in setup_udp_tunnel_sock (2) |
| // https://syzkaller.appspot.com/bug?id=b53aed2f936728226c331a4dc0b4f89d742fda9c |
| // status:open |
| // 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[2] = {0xffffffffffffffff, 0xffffffffffffffff}; |
| |
| int main(void) |
| { |
| syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x32ul, -1, 0); |
| intptr_t res = 0; |
| res = syscall(__NR_socket, 0x10ul, 3ul, 0ul); |
| if (res != -1) |
| r[0] = res; |
| res = syscall(__NR_socket, 2ul, 3ul, 0x11); |
| if (res != -1) |
| r[1] = res; |
| *(uint64_t*)0x20000100 = 0; |
| *(uint32_t*)0x20000108 = 0; |
| *(uint64_t*)0x20000110 = 0x20000000; |
| *(uint64_t*)0x20000000 = 0x20000140; |
| memcpy((void*)0x20000140, "\x58\x00\x00\x00\x10\x00\x01\x05\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00", |
| 20); |
| *(uint32_t*)0x20000154 = 0; |
| memcpy((void*)0x20000158, "\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x12\x00" |
| "\x08\x00\x01\x00\x67\x74\x70\x00\x2c\x00\x02\x00" |
| "\x08\x00\x01\x00", |
| 28); |
| *(uint32_t*)0x20000174 = -1; |
| memcpy((void*)0x20000178, "\x08\x00\x02\x00", 4); |
| *(uint32_t*)0x2000017c = -1; |
| memcpy((void*)0x20000180, "\x08\x00\x01\x00", 4); |
| *(uint32_t*)0x20000184 = r[1]; |
| memcpy((void*)0x20000188, "\x08\x00\x02\x00", 4); |
| *(uint32_t*)0x2000018c = -1; |
| memcpy((void*)0x20000190, |
| "\x08\x00\xa2\x30\xf0\xe7\x7b\x23\x1e\x90\x76\xee\xa5\x71\x23\x02\x00", |
| 17); |
| *(uint32_t*)0x200001a1 = -1; |
| *(uint64_t*)0x20000008 = 0x58; |
| *(uint64_t*)0x20000118 = 1; |
| *(uint64_t*)0x20000120 = 0; |
| *(uint64_t*)0x20000128 = 0; |
| *(uint32_t*)0x20000130 = 0; |
| syscall(__NR_sendmsg, r[0], 0x20000100ul, 0ul); |
| return 0; |
| } |