blob: f18a8d3594e32b2333bf716c5bed498542c93ea6 [file] [log] [blame]
// general protection fault in hash_ip6_uadt
// https://syzkaller.appspot.com/bug?id=1146d8ba066b77afe24ca840f426fe60b0492d2b
// status:dup
// 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[2] = {0xffffffffffffffff, 0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 3ul, 0x32ul, -1, 0);
intptr_t res = 0;
res = syscall(__NR_socket, 0x10ul, 3ul, 0xcul);
if (res != -1)
r[0] = res;
*(uint64_t*)0x20000300 = 0;
*(uint32_t*)0x20000308 = 0;
*(uint64_t*)0x20000310 = 0x20000000;
*(uint64_t*)0x20000000 = 0x20000040;
*(uint32_t*)0x20000040 = 0x44;
*(uint8_t*)0x20000044 = 2;
*(uint8_t*)0x20000045 = 6;
*(uint16_t*)0x20000046 = 1;
*(uint32_t*)0x20000048 = 0;
*(uint32_t*)0x2000004c = 0;
*(uint8_t*)0x20000050 = 0;
*(uint8_t*)0x20000051 = 0;
*(uint16_t*)0x20000052 = htobe16(0);
*(uint16_t*)0x20000054 = 0xc;
*(uint16_t*)0x20000056 = 3;
memcpy((void*)0x20000058, "hash:ip\000", 8);
*(uint16_t*)0x20000060 = 9;
*(uint16_t*)0x20000062 = 2;
memcpy((void*)0x20000064, "syz2\000", 5);
*(uint16_t*)0x2000006c = 5;
*(uint16_t*)0x2000006e = 1;
*(uint8_t*)0x20000070 = 7;
*(uint16_t*)0x20000074 = 5;
*(uint16_t*)0x20000076 = 4;
*(uint8_t*)0x20000078 = 0;
*(uint16_t*)0x2000007c = 5;
*(uint16_t*)0x2000007e = 5;
*(uint8_t*)0x20000080 = 0xa;
*(uint64_t*)0x20000008 = 0x44;
*(uint64_t*)0x20000318 = 1;
*(uint64_t*)0x20000320 = 0;
*(uint64_t*)0x20000328 = 0;
*(uint32_t*)0x20000330 = 0;
syscall(__NR_sendmsg, r[0], 0x20000300ul, 0ul);
res = syscall(__NR_socket, 0x10ul, 3ul, 0xcul);
if (res != -1)
r[1] = res;
*(uint64_t*)0x20000180 = 0x20000000;
*(uint16_t*)0x20000000 = 0x10;
*(uint16_t*)0x20000002 = 0;
*(uint32_t*)0x20000004 = 0;
*(uint32_t*)0x20000008 = 0xcf826992;
*(uint32_t*)0x20000188 = 0xc;
*(uint64_t*)0x20000190 = 0x20000140;
*(uint64_t*)0x20000140 = 0x20000040;
memcpy((void*)0x20000040,
"\xf4\x00\x00\x00\x0b\x06\x15\x0e\x2c\xbd\x70\x00\xfe\xdb\xdf\x25\x01"
"\x00\x00\x00\x09\x00\x02\x00\x73\x79\x7a\x32\x00\x00\x00\x00\x05\x00"
"\x01\x00\x07\x00\x00\x00\x08\x00\x09\x40\x00\x00\xd7\xb1\xa8\x00\x08"
"\x80\x1c\x00\x07\x80\x18\x00\x14\x80\x14\x00\x02\x40\xff\x02\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x10\x00\x07\x80\x0c"
"\x00\x18\x40\x00\x00\x00\x00\x00\x00\x00\x07\x10\x00\x07\x80\x0a\x00"
"\x11\x00\xaa\xaa\xaa\xaa\xaa\xaa\x00\x00\x10\x00\x07\x80\x09\x00\x13"
"\x00\x73\x79\x7a\x30\x00\x00\x00\x00\x10\x00\x07\x80\x0c\x00\x18\x40"
"\x00\x00\x00\x00\x00\x00\x00\x03\x18\x00\x07\x80\x14\x00\x17\x00\x73"
"\x79\x7a\x6b\x61\x6c\x6c\x65\x72\x30\x00\x00\x00\x00\x00\x00\x0c\x00"
"\x07\x80\x06\x00\x04\x40\x4e\x21\x00\x00\x0c\x00\x07\x80\x08\x00\x1c"
"\x40\x00\x00\x7f\xff\x0c\x00\x07\x80\x06\x00\x1d\x40\x01\x00\x00\x00"
"\x0c\x00\x07\x80\x05\x00\xc6\x26\x04\x00\x00\x00\x1c\x00\x07\x80\x08"
"\x00\x09\x40\x00\x00\x00\x02\x06\x00\x1d\x40\xf4\x06\x00\x00\x06\x00"
"\x1d\x40\x00\x04\x00\x00",
244);
*(uint64_t*)0x20000148 = 0xf4;
*(uint64_t*)0x20000198 = 1;
*(uint64_t*)0x200001a0 = 0;
*(uint64_t*)0x200001a8 = 0;
*(uint32_t*)0x200001b0 = 0x40000;
syscall(__NR_sendmsg, r[1], 0x20000180ul, 0x20000000ul);
return 0;
}