[PATCH OLK-6.6 0/1] Fix UAF issue for mfs
Fix one UAF issue for mfs. Hongbo Li (1): mfs: Fix UAF problem on event object when enable tracepoint fs/mfs/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.34.1
hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IDBKJZ ------------------ When the user reads event from mfs device, it will release the event object in the end. But the tracepoint outputs the message info whose space belongs to event object. And this cause the UAF problem on event object. Fixes: 18a8df2ba547 ("mfs: Add tracepoint for MFS") Signed-off-by: Hongbo Li <lihongbo22@huawei.com> --- fs/mfs/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/mfs/dev.c b/fs/mfs/dev.c index 902f73b1c25c..896fb6550eb5 100644 --- a/fs/mfs/dev.c +++ b/fs/mfs/dev.c @@ -106,8 +106,8 @@ static ssize_t mfs_dev_read(struct file *file, char __user *buf, xas_store(&xas, NULL); xas_unlock(&xas); out: - put_mfs_event(event); trace_mfs_dev_read(file, msg->opcode, msg->id, msg->fd); + put_mfs_event(event); return ret ? ret : n; } -- 2.34.1
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/19557 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/2A7... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/19557 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/2A7...
participants (2)
-
Hongbo Li -
patchwork bot