]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen/blkback: don't free be structure too early
authorJuergen Gross <jgross@suse.com>
Thu, 18 May 2017 15:28:48 +0000 (17:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:41:39 +0000 (14:41 +0200)
commitc4ed418dc93b6d44b21acc3dbe060ac1be921b79
treed34c1cc1c6735845324bf1349e32578e3577a801
parentf21d9eda322289bce95ade2b79f9cef314ab2b91
xen/blkback: don't free be structure too early

commit 71df1d7ccad1c36f7321d6b3b48f2ea42681c363 upstream.

The be structure must not be freed when freeing the blkif structure
isn't done. Otherwise a use-after-free of be when unmapping the ring
used for communicating with the frontend will occur in case of a
late call of xenblk_disconnect() (e.g. due to an I/O still active
when trying to disconnect).

Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Steven Haigh <netwiz@crc.id.au>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/xen-blkback/xenbus.c