| // BUG: unable to handle kernel paging request in dummy_set_vf_trust |
| // https://syzkaller.appspot.com/bug?id=9cbfe5395ef15b0d7ffc7a572adb5cb2b251496c |
| // 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[3] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff}; |
| |
| int main(void) |
| { |
| syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); |
| intptr_t res = 0; |
| res = syscall(__NR_socket, 0x10000000a, 1, 0); |
| if (res != -1) |
| r[0] = res; |
| res = syscall(__NR_socket, 0x10, 3, 0); |
| if (res != -1) |
| r[1] = res; |
| memcpy((void*)0x20001bc0, "dummy0\000\000\000\000\000\000\000\000\000\000", |
| 16); |
| *(uint32_t*)0x20001bd0 = 0; |
| res = syscall(__NR_ioctl, r[0], 0x8933, 0x20001bc0); |
| if (res != -1) |
| r[2] = *(uint32_t*)0x20001bd0; |
| *(uint64_t*)0x200000c0 = 0; |
| *(uint32_t*)0x200000c8 = 0; |
| *(uint64_t*)0x200000d0 = 0x20000040; |
| *(uint64_t*)0x20000040 = 0x20000180; |
| memcpy((void*)0x20000180, "\x50\x00\x00\x00\x13\x00\x33\x02\x00\x00\x00\x00" |
| "\x00\x00\x00\x00\x00\x00\x00\x00", |
| 20); |
| *(uint32_t*)0x20000194 = r[2]; |
| memcpy((void*)0x20000198, |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x16\x00\x2c\x00\x01\x00\x28" |
| "\x00\x09\x00\x00\x00\x20\xff\x00\x00\x00\xfa\x78\x41\x18\x7f\xff\xe1" |
| "\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" |
| "\xfd\x76\xdf\xaf\x4c\x46\x2e\x88\x73\x45\xa8\x8f\x36\x22\x9a\x2c\x69" |
| "\xe0\x27\xc5\x2e\x53\xca\xbb\x0b\x14\x4f\xa6\x40\x5c\x99\x9d\xfe\x87" |
| "\x23\x88\x1c\xa6\x05\x30\x94\xea\xd0\xb3\xbe\x5c\x50\x93\x10\xf6\x9a" |
| "\x7f\xe1\x26\xf7\x8d\xdd\x21\xb1\xa4\xd7\x34\xde\xc8\xe5\x3b\xf8\xb8" |
| "\x1e\x8b\xdb\x9f\x21\xc4\x54\x93\x35\x03\x97\x04\xfe\xe8\x78\xef\x32" |
| "\x3f\xa4\xa7\x29\xd1\x67\x0a\x60\x0d\x04\x29\xec\x6c\x82\x96\x4f\x37" |
| "\x99\x40\x18\x98\x42\x95\x62\xd7\xdf\xf6\x39\xe3\x3c\xbe\x17\x9c\x2f" |
| "\xe5\x98\x33\xec\xc8\x27\xef\x8d\xf8\x6f\x4d\x11\xe9\x50\x76\x03\x2f" |
| "\xc2\x22\x4d\x52\x35\x59\x46\xac\xd9\xc3\x86\x67\x5d\x3a\x46\x42\x05" |
| "\xb1\xc1\xd6\x4d\xfe\xce\xff\xd9\xec\x1f\x93\x61\xc8\xa4\x29\x34", |
| 220); |
| *(uint64_t*)0x20000048 = 0x50; |
| *(uint64_t*)0x200000d8 = 1; |
| *(uint64_t*)0x200000e0 = 0; |
| *(uint64_t*)0x200000e8 = 0; |
| *(uint32_t*)0x200000f0 = 0; |
| syscall(__NR_sendmsg, r[1], 0x200000c0, 0); |
| return 0; |
| } |