svn commit: r343433 - stable/12/sys/kern
Michael Tuexen
tuexen at FreeBSD.org
Fri Jan 25 15:39:34 UTC 2019
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__,
More information about the svn-src-stable
mailing list