ext4: reject inodes with negative size
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 10 Dec 2016 14:55:01 +0000 (09:55 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Mar 2017 02:18:30 +0000 (02:18 +0000)
commit 7e6e1ef48fc02f3ac5d0edecbb0c6087cd758d58 upstream.

Don't load an inode with a negative size; this causes integer overflow
problems in the VFS.

[ Added EXT4_ERROR_INODE() to mark file system as corrupted. -TYT]

Fixes: a48380f769df (ext4: rename i_dir_acl to i_size_high)
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[bwh: Backported to 3.2: use EIO instead of EFSCORRUPTED]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/ext4/inode.c

diff --cc fs/ext4/inode.c
Simple merge