]> git.ipfire.org Git - people/ms/linux.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:57:21 +0000 (14:57 -0800)
commit2cb1c1c696853478fe83782e2771f4f07ec75ea1
treeb346c0d6ddda44ceaca356582f451fa08b4f56bf
parentee1693299c8b5cd9ad7f861606ea9bf20ef75717
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