blob: a9fbcda30d14f58a2dd0030a91a8b95e7ea16d10 [file] [log] [blame]
// general protection fault in xsk_poll
// https://syzkaller.appspot.com/bug?id=a2176c353f66aa0dab0a37c901fb010771a9c3b2
// 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[1] = {0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
intptr_t res = 0;
res = syscall(__NR_socket, 0x2c, 3, 0);
if (res != -1)
r[0] = res;
*(uint32_t*)0x20000280 = r[0];
*(uint16_t*)0x20000284 = 0;
*(uint16_t*)0x20000286 = 0;
syscall(__NR_ppoll, 0x20000280, 1, 0, 0, 0);
return 0;
}