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

ksmbd: fix uninitialized symbol 'pntsd_size'

mainline inclusion
from mainline-5.16-rc7
commit f2e78aff
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G
CVE: NA

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

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

No check for if "rc" is an error code for build_sec_desc().
This can cause problems with using uninitialized pntsd_size.

Fixes: e2f34481 ("cifsd: add server-side procedures for SMB3")
Cc: stable@vger.kernel.org # v5.15
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: NSteve French <stfrench@microsoft.com>
Signed-off-by: NJason Yan <yanaijie@huawei.com>
Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
上级 34f25d11
...@@ -2941,6 +2941,10 @@ int smb2_open(struct ksmbd_work *work) ...@@ -2941,6 +2941,10 @@ int smb2_open(struct ksmbd_work *work)
&pntsd_size, &fattr); &pntsd_size, &fattr);
posix_acl_release(fattr.cf_acls); posix_acl_release(fattr.cf_acls);
posix_acl_release(fattr.cf_dacls); posix_acl_release(fattr.cf_dacls);
if (rc) {
kfree(pntsd);
goto err_out;
}
rc = ksmbd_vfs_set_sd_xattr(conn, rc = ksmbd_vfs_set_sd_xattr(conn,
path.dentry, path.dentry,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册