ext4: reject inodes with negative size
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 10 Dec 2016 14:55:01 +0000 (09:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jan 2017 09:40:14 +0000 (10:40 +0100)
commit3e4f8da9d177b447fdd5e82c94f66bac38aa3045
tree240f5dbed3aad832e2352e449b7c4f3d64fcf346
parent8084f57bc46894dbe08dac2a09d66553d7513a34
ext4: reject inodes with negative size

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c