]> git.baikalelectronics.ru Git - uboot.git/commit
ext4: recover from filesystem corruption when reading
authorIan Ray <ian.ray@ge.com>
Wed, 8 Nov 2017 15:35:10 +0000 (15:35 +0000)
committerStefano Babic <sbabic@denx.de>
Mon, 20 Nov 2017 08:58:31 +0000 (09:58 +0100)
commit0868017d43c2c023b662237bb0f527e8529abe13
tree7781fc0c6a8fa9e6c3019fd369e1570a45db13cb
parent06b7f9bf73241d8115b220c8465c485f0d05155f
ext4: recover from filesystem corruption when reading

Some fixes when reading EXT files and directory entries were identified
after using e2fuzz to corrupt an EXT3 filesystem:

 - Stop reading directory entries if the offset becomes badly aligned.

 - Avoid overwriting memory by clamping the length used to zero the buffer
   in ext4fs_read_file.  Also sanity check blocksize.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Reviewed-by: Stefano Babic <sbabic@denx.de>
fs/ext4/ext4_common.c
fs/ext4/ext4fs.c