]> git.baikalelectronics.ru Git - kernel.git/commit
staging: erofs: keep corrupted fs from crashing kernel in erofs_readdir()
authorGao Xiang <gaoxiang25@huawei.com>
Thu, 28 Mar 2019 20:14:58 +0000 (04:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Mar 2019 16:25:45 +0000 (17:25 +0100)
commit01479cf56c34ad72a7cc582c2812b4751ac01478
tree39e301840c4cfcddab36f97c465e38e177578b28
parent1df79c7a41823e1f0cde81bea5a904a3ad7a53ed
staging: erofs: keep corrupted fs from crashing kernel in erofs_readdir()

After commit 6dc4a64410c5, kernel cannot be crashed in the namei
path. However, corrupted nameoff can do harm in the process of
readdir for scenerios without dm-verity as well. Fix it now.

Fixes: a8dc4aab0a6a ("staging: erofs: add directory operations")
Cc: <stable@vger.kernel.org> # 4.19+
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/dir.c