android_kernel_sony_sdm845/fs/ext2
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jan Kara 4b5f060b09 ext2: Fix underflow in ext2_max_size()
commit 1c2d14212b15a60300a2d4f6364753e87394c521 upstream.

When ext2 filesystem is created with 64k block size, ext2_max_size()
will return value less than 0. Also, we cannot write any file in this fs
since the sb->maxbytes is less than 0. The core of the problem is that
the size of block index tree for such large block size is more than
i_blocks can carry. So fix the computation to count with this
possibility.

File size limits computed with the new function for the full range of
possible block sizes look like:

bits file_size
10     17247252480
11    275415851008
12   2196873666560
13   2197948973056
14   2198486220800
15   2198754754560
16   2198888906752

CC: stable@vger.kernel.org
Reported-by: yangerkun <yangerkun@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23 13:19:48 +01:00
..
acl.c ext2: Don't clear SGID when inheriting ACLs 2017-07-27 15:08:02 -07:00
acl.h
balloc.c
dir.c fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps 2016-09-27 21:06:22 -04:00
ext2.h
file.c Merge branch 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-10 17:11:50 -07:00
ialloc.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-10 20:16:43 -07:00
inode.c ext2: fix a block leak 2018-05-25 16:12:56 +02:00
ioctl.c fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps 2016-09-27 21:06:22 -04:00
Kconfig
Makefile
namei.c do d_instantiate/unlock_new_inode combinations safely 2018-05-30 07:50:16 +02:00
super.c ext2: Fix underflow in ext2_max_size() 2019-03-23 13:19:48 +01:00
symlink.c vfs: Remove {get,set,remove}xattr inode operations 2016-10-07 21:48:36 -04:00
xattr.c ext2: fix potential use after free 2018-12-05 19:42:40 +01:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c