Date: Wed, 22 May 2019 13:44:26 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 238035] Divide by zero in kern_fcntl_freebsd Message-ID: <bug-238035-227-okbavJrOaS@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-238035-227@https.bugs.freebsd.org/bugzilla/> References: <bug-238035-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238035 --- Comment #2 from Andrew Turner <Andrew@FreeBSD.org> --- The reproducer Syzkaller found is below. // autogenerated by syzkaller (https://github.com/google/syzkaller) #define _GNU_SOURCE #include <pwd.h> #include <stdarg.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/endian.h> #include <sys/syscall.h> #include <unistd.h> uint64_t r[2] =3D {0xffffffffffffffff, 0xffffffffffffffff}; int main(void) { syscall(SYS_mmap, 0x20000000, 0x1000000, 3, 0x1012, -1, 0); intptr_t res =3D 0; memcpy((void*)0x20000040, "/dev///\000", 8); res =3D syscall(SYS_openat, 0xffffffffffffff9c, 0x20000040, 0, 0); if (res !=3D -1) r[0] =3D res; res =3D syscall(SYS_dup2, r[0], r[0]); if (res !=3D -1) r[1] =3D res; syscall(SYS_fcntl, r[1], 0xf, 0); return 0; } --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238035-227-okbavJrOaS>