blob: a13335ea1195d89c2cd31c894a6ebfc41377d992 [file] [log] [blame]
// KASAN: slab-out-of-bounds Read in bpf_prog_create
// https://syzkaller.appspot.com/bug?id=bec00f7157ae25598e007a732156065c1fbaa485
// 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;
memcpy((void*)0x20000000, "/dev/ppp\000", 9);
res = syscall(__NR_openat, 0xffffffffffffff9c, 0x20000000, 0, 0);
if (res != -1)
r[0] = res;
syscall(__NR_ioctl, r[0], 0xc004743e, 0x20000540);
*(uint16_t*)0x200000c0 = 0x8200;
*(uint64_t*)0x200000c8 = 0x20000080;
*(uint16_t*)0x20000080 = 0;
*(uint8_t*)0x20000082 = 0;
*(uint8_t*)0x20000083 = 0;
*(uint32_t*)0x20000084 = 0;
syscall(__NR_ioctl, r[0], 0x40107447, 0x200000c0);
return 0;
}