f2fs: add additional sanity check in f2fs_acl_from_disk()
authorChengguang Xu <cgxu519@gmx.com>
Thu, 30 Aug 2018 13:33:31 +0000 (21:33 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 26 Oct 2018 18:21:25 +0000 (11:21 -0700)
commite34e1361b682f96dd8e599f657d51733e9359af3
treeee6926fa22f166cba10f90f98e494d2c223a6390
parentdcfd4c956bb5570f99037df864f73bc118e94b54
f2fs: add additional sanity check in f2fs_acl_from_disk()

Add additinal sanity check for irregular case(e.g. corruption).
If size of extended attribution is smaller than size of acl header,
then return -EINVAL.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/acl.c