xen: fix ioreq handling
commitb85f9dfdb156ae2a2a52f39a36e9f1f270614cd2
authorJan Beulich <JBeulich@suse.com>
Tue, 22 Nov 2016 12:56:51 +0000 (22 05:56 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 22 Nov 2016 18:29:22 +0000 (22 10:29 -0800)
tree0dcd01f21000195eda8004dd50cbc77dfa339d2d
parenta7764f1548ef9946af30a8f96be9cef10761f0c1
xen: fix ioreq handling

Avoid double fetches and bounds check size to avoid overflowing
internal variables.

This is CVE-2016-9381 / XSA-197.

Reported-by: yanghongke <yanghongke@huawei.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
xen-hvm.c