]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: reject inodes with negative size
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 10 Dec 2016 14:55:01 +0000 (09:55 -0500)
committerJiri Slaby <jslaby@suse.cz>
Thu, 26 Jan 2017 16:22:35 +0000 (17:22 +0100)
commit30256224d9d4620f720be63b1e1b231a6e390ed2
tree2af9d669f333570309463b1e54be045237aa17d3
parent2b47f7351dd6e24e54acbd6883fccc6c5650374e
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]

js: use EIO for 3.12 instead of EFSCORRUPTED.

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: Jiri Slaby <jslaby@suse.cz>
fs/ext4/inode.c