| // BUG: unable to handle kernel NULL pointer dereference in sock_poll |
| // https://syzkaller.appspot.com/bug?id=924f61f6084bdb25ca671dde359fadfabe976b05 |
| // status:dup |
| // 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 = 0; |
| res = syscall(__NR_socket, 0x2b, 1, 0); |
| if (res != -1) |
| r[0] = res; |
| *(uint32_t*)0x20000040 = r[0]; |
| *(uint16_t*)0x20000044 = 0; |
| *(uint16_t*)0x20000046 = 0; |
| syscall(__NR_poll, 0x20000040, 1, 3); |
| } |
| |
| int main() |
| { |
| syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); |
| loop(); |
| return 0; |
| } |