Commit 3fec8d09 authored by Dominique Martinet's avatar Dominique Martinet Committed by sanglipeng
Browse files

9p/xen: check logical size for buffer size

stable inclusion
from stable-v5.10.159
commit a8c5ffb4dffd30ae663497e1cedfcee0a1b65b71
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7NTXH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a8c5ffb4dffd30ae663497e1cedfcee0a1b65b71



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

[ Upstream commit 391c18cf ]

trans_xen did not check the data fits into the buffer before copying
from the xen ring, but we probably should.
Add a check that just skips the request and return an error to
userspace if it did not fit

Tested-by: default avatarStefano Stabellini <sstabellini@kernel.org>
Reviewed-by: default avatarChristian Schoenebeck <linux_oss@crudebyte.com>
Link: https://lkml.kernel.org/r/20221118135542.63400-1-asmadeus@codewreck.org


Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 67e9f8b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment