]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: check for directory entries too close to block end
authorJan Kara <jack@suse.cz>
Mon, 2 Dec 2019 17:02:13 +0000 (18:02 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 14 Dec 2019 22:22:45 +0000 (17:22 -0500)
commit672c5a4faedf00019758215e90d507155c17b0b1
treebdcda5c6a7e922dc12a8f852421c86f4c3e40b74
parent02b7da92597261fcd96b433173b59b384c912a64
ext4: check for directory entries too close to block end

ext4_check_dir_entry() currently does not catch a case when a directory
entry ends so close to the block end that the header of the next
directory entry would not fit in the remaining space. This can lead to
directory iteration code trying to access address beyond end of current
buffer head leading to oops.

CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191202170213.4761-3-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/dir.c