]> 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)
commitc4e2aaf740e7d9b7b7d6538d645ed50346a3704c
tree39e301840c4cfcddab36f97c465e38e177578b28
parent8635d343eb732a71779e0e1f3fd5ece85f317c4d
staging: erofs: keep corrupted fs from crashing kernel in erofs_readdir()

After commit 5e2a6bb8acd7, 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: 995f92fa343a ("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