]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
libext2fs: fix data read corruption in ext2fs_file_read_inline_data
authorDarrick J. Wong <djwong@kernel.org>
Thu, 17 Jul 2025 14:59:33 +0000 (07:59 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 31 Jul 2025 14:41:55 +0000 (10:41 -0400)
commit10d7761527fa0778a64ea5cf3482744869dbb3a7
tree48657f8997790f7ee2dccab3bd26492f1829c9ab
parentb9d23a1a128e553f6ce73766bc884263ba30990d
libext2fs: fix data read corruption in ext2fs_file_read_inline_data

Fix numerous problems in the function that reads data from an inlinedata
file:

 - Reads starting after isize should be returned as short reads.
 - Reads past the end of the inline data should return zeroes.
 - Reads from the inline data buffer must not exceed isize.

Cc: linux-ext4@vger.kernel.org # v1.43
Fixes: 54e880b870f7fe ("libext2fs: handle inline data in read/write function")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20250717145933.GI2672022@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/fileio.c