Author: fsu
Date: Mon Mar  4 11:19:21 2019
New Revision: 344755
URL: https://svnweb.freebsd.org/changeset/base/344755

Log:
  Fix integer overflow possibility.
  
  Reported by:    Christopher Krah <k...@protonmail.com>
  Reported as:    FS-2-EXT2-1: Out-of-Bounds Write in nmount (ext2_vget)
  Reviewed by:    pfg
  MFC after:      1 week
  
  Differential Revision:    https://reviews.freebsd.org/D19326

Modified:
  head/sys/fs/ext2fs/ext2_vfsops.c

Modified: head/sys/fs/ext2fs/ext2_vfsops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vfsops.c    Mon Mar  4 11:12:19 2019        
(r344754)
+++ head/sys/fs/ext2fs/ext2_vfsops.c    Mon Mar  4 11:19:21 2019        
(r344755)
@@ -1163,8 +1163,8 @@ ext2_vget(struct mount *mp, ino_t ino, int flags, stru
        struct buf *bp;
        struct vnode *vp;
        struct thread *td;
-       int i, error;
-       int used_blocks;
+       unsigned int i, used_blocks;
+       int error;
 
        td = curthread;
        error = vfs_hash_get(mp, ino, flags, td, vpp, NULL, NULL);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to