blob: 2389f9790ce05163224072daae194862c0d6a66f [file] [log] [blame]
// general protection fault in do_remount_sb
// https://syzkaller.appspot.com/bug?id=2d9dd48b8e14db4aa0c8fb21805455ac830e7a9a
// status:invalid
// autogenerated by syzkaller (http://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
void loop()
{
memcpy((void*)0x20000680, "./file0", 8);
syscall(__NR_mkdir, 0x20000680, 0);
memcpy((void*)0x20000000, "./file0", 8);
memcpy((void*)0x200000c0, "./file0", 8);
memcpy((void*)0x20000280,
"\x73\x79\x73\x66\x73\x00\x2a\x86\x4f\x4b\xc0\x0b\xce\x1b\xdb\x20\x63"
"\x72\x13\xb1\xe8\x94\xd1\x20\x71\x5f\x9d\xc1\x12\x5b\x04\x2c\x72\x26"
"\xeb\x01\x36\xd9\x62\x4e\xa1\xd2\x33\x74\xa6\x60\xfe\x5a\xc1\x73\x72"
"\x2f\xd3\x67\xad\x22\xe8\x55\x30\x25\xa2\xe8\xbe\x0b\xc5\x51\x43\x79"
"\xaf\x72\x13\xd3\x2b\x8d\x5d\x06\xdc\x8f\xbf\x2c\x84\x9e\xd9\xcd\xef"
"\xc7\x4b\x03\xdf\xa9\xcb\x5a\x90\xb2\x8b\x4b\x24\xd7\x86\x2c\x3d\x66"
"\xfc\xa5\x31\x67\xd5\x42\x42\x35\x43\x5a\x3d\xbb\x76\xbc\x7d\x3c\x42"
"\xfc\x2e\x9c\x69\x61\x14\xa6\xf8\x88\xf0\xda\x85\x27\x76\x83\xcf\xc1"
"\xc4\xd2\xbf\x71\xc2\x55\xa3\x13\x4d\x64\xcc\x3f\xed\x8e\x97\x79\x8d"
"\xeb\x86\x31\xcb\xf7\x68\x2c\x9f\xa2\xed\x03\x14\x65\xaa\x19\x1d\xf9"
"\x22\xf7\x64\x29\x7c\xba\x22\xa8\x49\x9d\x17\x7f\x49\xfb\xa9\x40\xf5"
"\x5b\xbc\x8b\x72\x3f\xd3\x74\xf1\xfe\xd7\x8c\x8a\xee\xc6\x81\x1d\x9b"
"\x58\x79\x48\x73\x87\xd5\x65\x94\xa1\x4c\x25\x88\x27\x4d\xe8\x4f\xa2"
"\x76\x10\x30\x2b\x3f\xb5\x41\x72\xa8\xc9\x10\xa0\x7e\x7c\x76\xea\x46"
"\x5a\xa6\x84\x02",
242);
syscall(__NR_mount, 0x20000000, 0x200000c0, 0x20000280, 0, 0x20000080);
memcpy((void*)0x20000100, "./file0", 8);
syscall(__NR_chroot, 0x20000100);
memcpy((void*)0x20000040, "./file0", 8);
syscall(__NR_umount2, 0x20000040, 0);
}
int main()
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
loop();
return 0;
}