]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: ensure i_size is smaller than maxbytes
authorZhang Yi <yi.zhang@huawei.com>
Tue, 6 May 2025 01:20:09 +0000 (09:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:25 +0000 (11:05 +0100)
commita597a609bfd4a2f6f4bce7b7d5f62769401c4c81
treecd9ccd15ae5a4a50fa60ec0cdac26cf9408ce378
parent9004a1cc5cfc69bd894cc82379fa3ec34ecff3c5
ext4: ensure i_size is smaller than maxbytes

commit 1a77a028a392fab66dd637cdfac3f888450d00af upstream.

The inode i_size cannot be larger than maxbytes, check it while loading
inode from the disk.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Link: https://patch.msgid.link/20250506012009.3896990-4-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c