提交 7387a959 编写于 作者: D Dan Carpenter 提交者: openeuler-sync-bot

fs/ntfs3: Delete duplicate condition in ntfs_read_mft()

mainline inclusion
from mainline-v6.2-rc1
commit 65801516
category: bugfix
bugzilla: 188526, https://gitee.com/src-openeuler/kernel/issues/I71SYO
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=658015167a8432b88f5d032e9d85d8fd50e5bf2c

--------------------------------

There were two patches which addressed the same bug and added the same
condition:

commit 6db62086 ("fs/ntfs3: Validate data run offset")
commit 887bfc54 ("fs/ntfs3: Fix slab-out-of-bounds read in run_unpack")

Delete one condition.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: NZhaoLong Wang <wangzhaolong1@huawei.com>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: NZhang Yi <yi.zhang@huawei.com>
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
(cherry picked from commit 1ca5b2ca)
上级 0800886c
......@@ -380,12 +380,6 @@ static struct inode *ntfs_read_mft(struct inode *inode,
t64 = le64_to_cpu(attr->nres.svcn);
/* offset to packed runs is out-of-bounds */
if (roff > asize) {
err = -EINVAL;
goto out;
}
err = run_unpack_ex(run, sbi, ino, t64, le64_to_cpu(attr->nres.evcn),
t64, Add2Ptr(attr, roff), asize - roff);
if (err < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册