From: Yang Yingliang yangyingliang@huawei.com
mainline inclusion from mainline-5.15-rc1 commit 673b9ba7a1404fa5beda936b8ad509b70a516b52 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA
Reference: https://git.kernel.org/torvalds/linux/c/673b9ba7a140
-------------------------------
Before ksmbd_vfs_stream_read() return, memory allocate in ksmbd_vfs_getcasexattr() need be freed.
Signed-off-by: Yang Yingliang yangyingliang@huawei.com Signed-off-by: Namjae Jeon namjae.jeon@samsung.com Signed-off-by: Steve French stfrench@microsoft.com Signed-off-by: Jason Yan yanaijie@huawei.com Signed-off-by: Zhong Jinghua zhongjinghua@huawei.com --- fs/cifsd/vfs.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/fs/cifsd/vfs.c b/fs/cifsd/vfs.c index e70b67e41cd4..85872416bf9b 100644 --- a/fs/cifsd/vfs.c +++ b/fs/cifsd/vfs.c @@ -290,6 +290,7 @@ static int ksmbd_vfs_stream_read(struct ksmbd_file *fp, char *buf, loff_t *pos, }
memcpy(buf, &stream_buf[*pos], count); + kvfree(stream_buf); return v_len > count ? count : v_len; }