提交 fcfb5525 编写于 作者: N Namjae Jeon 提交者: Zhong Jinghua

cifsd: fix invalid memory access in smb2_write()

mainline inclusion
from mainline-5.15-rc1
commit bcd62a36
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G
CVE: NA

Reference: https://git.kernel.org/torvalds/linux/c/bcd62a368314

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

Add missing fp initialzation to prevent invalid memory access in
smb2_write().
Reported-by: NCoverity Scan <scan-admin@coverity.com>
Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: NSteve French <stfrench@microsoft.com>
Signed-off-by: NJason Yan <yanaijie@huawei.com>
Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
上级 c46a067f
...@@ -6078,7 +6078,7 @@ int smb2_write(struct ksmbd_work *work) ...@@ -6078,7 +6078,7 @@ int smb2_write(struct ksmbd_work *work)
{ {
struct smb2_write_req *req; struct smb2_write_req *req;
struct smb2_write_rsp *rsp, *rsp_org; struct smb2_write_rsp *rsp, *rsp_org;
struct ksmbd_file *fp; struct ksmbd_file *fp = NULL;
loff_t offset; loff_t offset;
size_t length; size_t length;
ssize_t nbytes; ssize_t nbytes;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册