lkml.org 
[lkml]   [2019]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [PATCH v6 2/2] xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront
On Tue, Jan 15, 2019 at 09:20:36AM +0100, Roger Pau Monné wrote:
> On Tue, Jan 15, 2019 at 12:41:44AM +0800, Dongli Zhang wrote:
> > The xenstore 'ring-page-order' is used globally for each blkback queue and
> > therefore should be read from xenstore only once. However, it is obtained
> > in read_per_ring_refs() which might be called multiple times during the
> > initialization of each blkback queue.
> >
> > If the blkfront is malicious and the 'ring-page-order' is set in different
> > value by blkfront every time before blkback reads it, this may end up at
> > the "WARN_ON(i != (XEN_BLKIF_REQS_PER_PAGE * blkif->nr_ring_pages));" in
> > xen_blkif_disconnect() when frontend is destroyed.
> >
> > This patch reworks connect_ring() to read xenstore 'ring-page-order' only
> > once.
> >
> > Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
>
> LGTM:
>
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Applied.

Will push out to Jens in a couple of days. Thank you!
>
> Thanks!

\
 
 \ /
  Last update: 2019-01-17 16:29    [W:0.055 / U:2.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site