提交 1a82a3ed 编写于 作者: K Konstantin Komarov 提交者: Zheng Zengkai

fs/ntfs3: Check for NULL if ATTR_EA_INFO is incorrect

mainline inclusion
from mainline-v5.15
commit 35afb70d
category: feature
bugzilla:
https://gitee.com/openeuler/kernel/issues/I4G67J?from=project-issue
CVE: NA

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

This can be reason for reported panic
https://lore.kernel.org/ntfs3/f9de5807-2311-7374-afb0-bc5dffb522c0@gmail.com/
Fixes: 4342306f ("fs/ntfs3: Add file operations and implementation")
Reported-by: NMohammad Rasim <mohammad.rasim96@gmail.com>
Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: NYin Xiujiang <yinxiujiang@kylinos.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NHou Tao <houtao1@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 aa71fc11
...@@ -3080,6 +3080,8 @@ static bool ni_update_parent(struct ntfs_inode *ni, struct NTFS_DUP_INFO *dup, ...@@ -3080,6 +3080,8 @@ static bool ni_update_parent(struct ntfs_inode *ni, struct NTFS_DUP_INFO *dup,
const struct EA_INFO *info; const struct EA_INFO *info;
info = resident_data_ex(attr, sizeof(struct EA_INFO)); info = resident_data_ex(attr, sizeof(struct EA_INFO));
/* If ATTR_EA_INFO exists 'info' can't be NULL. */
if (info)
dup->ea_size = info->size_pack; dup->ea_size = info->size_pack;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册