]> git.baikalelectronics.ru Git - kernel.git/commit
xen/scsifront: harden driver against malicious backend
authorJuergen Gross <jgross@suse.com>
Thu, 28 Apr 2022 07:53:23 +0000 (09:53 +0200)
committerJuergen Gross <jgross@suse.com>
Thu, 19 May 2022 12:02:49 +0000 (14:02 +0200)
commitd75038a26202bee6fb474bd7879b77917b5c5a96
tree5eb2c927019c1208c8cccc97d9f2c2aeb7c2ad98
parentc991381b1c6abb4a7ffa22128d588d68317fffad
xen/scsifront: harden driver against malicious backend

Instead of relying on a well behaved PV scsi backend verify all meta
data received from the backend and avoid multiple reads of the same
data from the shared ring page.

In case any illegal data from the backend is detected switch the
PV device to a new "error" state and deactivate it for further use.

Use the "lateeoi" variant for the event channel in order to avoid
event storms blocking the guest.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20220428075323.12853-5-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/scsi/xen-scsifront.c