blob: ce1b040114786e91c839ce64577a29777aa49951 [file] [log] [blame]
// general protection fault in p9_fd_create_unix
// https://syzkaller.appspot.com/bug?id=224f304431abbbe0dc290277e84981992be389bb
// status:fixed
// autogenerated by syzkaller (http://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
void loop()
{
memcpy((void*)0x200003c0, "./file0", 8);
memcpy((void*)0x20000400, "./file0", 8);
memcpy((void*)0x20000440, "9p", 3);
memcpy((void*)0x200006c0, "trans=unix,", 11);
memcpy((void*)0x200006cb, "access=client", 13);
*(uint8_t*)0x200006d8 = 0x2c;
memcpy((void*)0x200006d9, "nodevmap", 8);
*(uint8_t*)0x200006e1 = 0x2c;
memcpy((void*)0x200006e2, "access=client", 13);
*(uint8_t*)0x200006ef = 0x2c;
memcpy((void*)0x200006f0, "aname", 5);
*(uint8_t*)0x200006f5 = 0x3d;
memcpy((void*)0x200006f6, "vboxnet1:em0+cpuset", 19);
*(uint8_t*)0x20000709 = 0x2c;
*(uint8_t*)0x2000070a = 0;
syscall(__NR_mount, 0x200003c0, 0x20000400, 0x20000440, 0x1020000,
0x200006c0);
memcpy((void*)0x20000380, "./file0", 8);
syscall(__NR_mkdir, 0x20000380, 8);
memcpy((void*)0x200000c0, "./file0", 8);
memcpy((void*)0x20000340, "9p", 3);
syscall(__NR_mount, 0, 0x200000c0, 0x20000340, 0, 0x200006c0);
}
int main()
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
loop();
return 0;
}