svn commit: r343434 - stable/11/sys/kern
Michael Tuexen
tuexen at FreeBSD.org
Fri Jan 25 15:40:52 UTC 2019
Author: tuexen
Date: Fri Jan 25 15:40:51 2019
New Revision: 343434
URL: https://svnweb.freebsd.org/changeset/base/343434
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/11/sys/kern/vfs_subr.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/vfs_subr.c
==============================================================================
--- stable/11/sys/kern/vfs_subr.c Fri Jan 25 15:39:33 2019 (r343433)
+++ stable/11/sys/kern/vfs_subr.c Fri Jan 25 15:40:51 2019 (r343434)
@@ -1791,7 +1791,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