]> git.baikalelectronics.ru Git - kernel.git/commit
9p/xen: check logical size for buffer size
authorDominique Martinet <asmadeus@codewreck.org>
Fri, 18 Nov 2022 13:44:41 +0000 (22:44 +0900)
committerDominique Martinet <asmadeus@codewreck.org>
Wed, 23 Nov 2022 05:01:27 +0000 (14:01 +0900)
commit391c18cf776eb4569ecda1f7794f360fe0a45a26
tree10a3ffb03e458b1461069ff48257b6f72cfc4836
parent6854fadbeee10891ed74246bdc05031906b6c8cf
9p/xen: check logical size for buffer size

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: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
Link: https://lkml.kernel.org/r/20221118135542.63400-1-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
net/9p/trans_xen.c