Date: Fri, 25 Jan 2019 15:39:33 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r343433 - stable/12/sys/kern Message-ID: <201901251539.x0PFdX6J046731@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Fri Jan 25 15:39:33 2019 New Revision: 343433 URL: https://svnweb.freebsd.org/changeset/base/343433 Log: MFC r342857: Avoid overfow in vtruncbuf() Using daddr_t instead of int avoids trunclbn to become negative when it shouldn't. This isssue was found by running syzkaller. Reviewed by: mckusick, kib, markj Differential Revision: https://reviews.freebsd.org/D18763 Modified: stable/12/sys/kern/vfs_subr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_subr.c ============================================================================== --- stable/12/sys/kern/vfs_subr.c Fri Jan 25 15:25:53 2019 (r343432) +++ stable/12/sys/kern/vfs_subr.c Fri Jan 25 15:39:33 2019 (r343433) @@ -1858,7 +1858,7 @@ vtruncbuf(struct vnode *vp, struct ucred *cred, off_t { struct buf *bp, *nbp; int anyfreed; - int trunclbn; + daddr_t trunclbn; struct bufobj *bo; CTR5(KTR_VFS, "%s: vp %p with cred %p and block %d:%ju", __func__,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901251539.x0PFdX6J046731>