Author: tuexen Date: Tue Jan 8 09:04:27 2019 New Revision: 342857 URL: https://svnweb.freebsd.org/changeset/base/342857
Log: 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 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18763 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Jan 8 05:41:04 2019 (r342856) +++ head/sys/kern/vfs_subr.c Tue Jan 8 09:04:27 2019 (r342857) @@ -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__, _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
