blob: 34fc05c678a45184607f86a3fe31e88b2443192a [file] [log] [blame]
// general protection fault in ip6erspan_set_version
// https://syzkaller.appspot.com/bug?id=1a7792e0143b23b9912cf187054052ffaf849714
// status:fixed
// 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);
long res = 0;
res = syscall(__NR_socket, 0x10, 3, 0);
if (res != -1)
r[0] = res;
*(uint64_t*)0x20001340 = 0;
*(uint32_t*)0x20001348 = 0xfdc5;
*(uint64_t*)0x20001350 = 0x20001300;
*(uint64_t*)0x20001300 = 0x20000180;
*(uint32_t*)0x20000180 = 0x40;
*(uint16_t*)0x20000184 = 0x10;
*(uint16_t*)0x20000186 = 0xff1f;
*(uint32_t*)0x20000188 = 0;
*(uint32_t*)0x2000018c = 0;
*(uint8_t*)0x20000190 = 0;
*(uint8_t*)0x20000191 = 0;
*(uint16_t*)0x20000192 = 0;
*(uint32_t*)0x20000194 = 0;
*(uint32_t*)0x20000198 = 0;
*(uint32_t*)0x2000019c = 0;
*(uint16_t*)0x200001a0 = 0x20;
*(uint16_t*)0x200001a2 = 0x12;
*(uint16_t*)0x200001a4 = 0x11;
*(uint16_t*)0x200001a6 = 1;
memcpy((void*)0x200001a8, "ip6erspan\000", 10);
*(uint16_t*)0x200001b4 = 0xc;
*(uint16_t*)0x200001b6 = 2;
*(uint16_t*)0x200001b8 = 8;
*(uint16_t*)0x200001ba = 3;
*(uint16_t*)0x200001bc = 0;
*(uint64_t*)0x20001308 = 0x25a;
*(uint64_t*)0x20001358 = 1;
*(uint64_t*)0x20001360 = 0;
*(uint64_t*)0x20001368 = 0;
*(uint32_t*)0x20001370 = 0;
syscall(__NR_sendmsg, r[0], 0x20001340, 0);
return 0;
}