]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen-scsiback: mark pvscsi frontend request consumed only after last read
authorJuergen Gross <jgross@suse.com>
Tue, 17 Feb 2015 07:02:47 +0000 (08:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 22:52:49 +0000 (14:52 -0800)
commitbf14e5189dd08aecb9b4e3ae63aa8eb00bfdeec1
tree4fc1985977ae07720094cea5c83bbedb17224912
parentbeb843e55e0a5b46504cc1207bdf65857accc028
xen-scsiback: mark pvscsi frontend request consumed only after last read

commit facb5732b0bb59ebbc11b5d5abc249e677ddbeb6 upstream.

A request in the ring buffer mustn't be read after it has been marked
as consumed. Otherwise it might already have been reused by the
frontend without violating the ring protocol.

To avoid inconsistencies in the backend only work on a private copy
of the request. This will ensure a malicious guest not being able to
bypass consistency checks of the backend by modifying an active
request.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/xen/xen-scsiback.c