| // general protection fault in wait_consider_task |
| // https://syzkaller.appspot.com/bug?id=68c0c174c30a272bc99336c276caa67fb74bd95f |
| // 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[4] = {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, |
| 0xffffffffffffffff}; |
| |
| int main(void) |
| { |
| syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); |
| intptr_t res = 0; |
| memcpy((void*)0x20000280, "/dev/infiniband/rdma_cm\000", 24); |
| res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000280, 2, 0); |
| if (res != -1) |
| r[0] = res; |
| *(uint32_t*)0x20000080 = 0; |
| *(uint16_t*)0x20000084 = 0x18; |
| *(uint16_t*)0x20000086 = 0xfa00; |
| *(uint64_t*)0x20000088 = 0; |
| *(uint64_t*)0x20000090 = 0x20000040; |
| *(uint16_t*)0x20000098 = 0x13f; |
| *(uint8_t*)0x2000009a = 0; |
| *(uint8_t*)0x2000009b = 0; |
| *(uint8_t*)0x2000009c = 0; |
| *(uint8_t*)0x2000009d = 0; |
| *(uint8_t*)0x2000009e = 0; |
| *(uint8_t*)0x2000009f = 0; |
| res = syscall(__NR_write, r[0], 0x20000080, 0x20); |
| if (res != -1) |
| r[1] = *(uint32_t*)0x20000040; |
| *(uint32_t*)0x200000c0 = 0x14; |
| *(uint16_t*)0x200000c4 = 0x88; |
| *(uint16_t*)0x200000c6 = 0xfa00; |
| *(uint32_t*)0x200000c8 = r[1]; |
| *(uint16_t*)0x200000cc = 0x30; |
| *(uint16_t*)0x200000ce = 0; |
| *(uint16_t*)0x200000d0 = 0x1b; |
| *(uint16_t*)0x200000d2 = htobe16(0); |
| *(uint32_t*)0x200000d4 = htobe32(0); |
| memcpy((void*)0x200000d8, |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", |
| 16); |
| *(uint64_t*)0x200000e8 = htobe64(0x1110002); |
| *(uint64_t*)0x200000f0 = htobe64(-1); |
| *(uint64_t*)0x200000f8 = 0; |
| syscall(__NR_write, r[0], 0x200000c0, 0x90); |
| memcpy((void*)0x200001c0, "/dev/infiniband/rdma_cm\000", 24); |
| res = syscall(__NR_openat, 0xffffffffffffff9c, 0x200001c0, 2, 0); |
| if (res != -1) |
| r[2] = res; |
| *(uint32_t*)0x20000080 = 0; |
| *(uint16_t*)0x20000084 = 0x18; |
| *(uint16_t*)0x20000086 = 0xfa00; |
| *(uint64_t*)0x20000088 = 0; |
| *(uint64_t*)0x20000090 = 0x20000040; |
| *(uint16_t*)0x20000098 = 0x13f; |
| *(uint8_t*)0x2000009a = 0; |
| *(uint8_t*)0x2000009b = 0; |
| *(uint8_t*)0x2000009c = 0; |
| *(uint8_t*)0x2000009d = 0; |
| *(uint8_t*)0x2000009e = 0; |
| *(uint8_t*)0x2000009f = 0; |
| res = syscall(__NR_write, r[2], 0x20000080, 0x20); |
| if (res != -1) |
| r[3] = *(uint32_t*)0x20000040; |
| *(uint32_t*)0x200000c0 = 0x14; |
| *(uint16_t*)0x200000c4 = 0x88; |
| *(uint16_t*)0x200000c6 = 0xfa00; |
| *(uint32_t*)0x200000c8 = r[3]; |
| *(uint16_t*)0x200000cc = 0x30; |
| *(uint16_t*)0x200000ce = 0; |
| *(uint16_t*)0x200000d0 = 0x1b; |
| *(uint16_t*)0x200000d2 = htobe16(0); |
| *(uint32_t*)0x200000d4 = htobe32(0); |
| memcpy((void*)0x200000d8, |
| "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", |
| 16); |
| *(uint64_t*)0x200000e8 = htobe64(0x1110002); |
| *(uint64_t*)0x200000f0 = htobe64(-1); |
| *(uint64_t*)0x200000f8 = 0; |
| syscall(__NR_write, r[2], 0x200000c0, 0x90); |
| return 0; |
| } |