blob: 983d4d2528ed250b851aa6caaef03cfc41c67e25 [file] [log] [blame]
// BUG: unable to handle kernel NULL pointer dereference in do_sys_poll
// https://syzkaller.appspot.com/bug?id=43219b3fdedef18d16e0356830bfe9f8e65e3688
// status:fixed
// 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, 0x26, 5, 0);
if (res != -1)
r[0] = res;
*(uint32_t*)0x20003900 = -1;
*(uint16_t*)0x20003904 = 0;
*(uint16_t*)0x20003906 = 0;
*(uint32_t*)0x20003908 = r[0];
*(uint16_t*)0x2000390c = 0;
*(uint16_t*)0x2000390e = 0;
*(uint32_t*)0x20003910 = -1;
*(uint16_t*)0x20003914 = 0;
*(uint16_t*)0x20003916 = 0;
syscall(__NR_poll, 0x20003900, 3, 6);
}
int main()
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
loop();
return 0;
}