summaryrefslogtreecommitdiff
path: root/drivers/xen
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2021-07-30 13:38:54 +0300
committerJuergen Gross <jgross@suse.com>2021-08-30 13:01:59 +0300
commitb94e4b147fd1992ad450e1fea1fdaa3738753373 (patch)
treed66c5592e6e2ebc8d0cad6adaf260072f7d3731c /drivers/xen
parent8f5a695d99000fc3aa73934d7ced33cfc64dcdab (diff)
downloadlinux-b94e4b147fd1992ad450e1fea1fdaa3738753373.tar.xz
xen/blkfront: don't trust the backend response data blindly
Today blkfront will trust the backend to send only sane response data. In order to avoid privilege escalations or crashes in case of malicious backends verify the data to be within expected limits. Especially make sure that the response always references an outstanding request. Introduce a new state of the ring BLKIF_STATE_ERROR which will be switched to in case an inconsistency is being detected. Recovering from this state is possible only via removing and adding the virtual device again (e.g. via a suspend/resume cycle). Make all warning messages issued due to valid error responses rate limited in order to avoid message floods being triggered by a malicious backend. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Link: https://lore.kernel.org/r/20210730103854.12681-4-jgross@suse.com Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen')
0 files changed, 0 insertions, 0 deletions