summaryrefslogtreecommitdiff
path: root/drivers/net/xen-netfront.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2022-02-25 16:05:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-11 10:03:32 +0100
commitf306575016dcf47ed6cd40e1fe872a4d8c665a8b (patch)
treebb135fc8db391b4264781e09ea7ef051eb598d3f /drivers/net/xen-netfront.c
parent73e1d9b33f2bd93ce30719dfc8990b6328243b7e (diff)
xen/blkfront: don't use gnttab_query_foreign_access() for mapped status
Commit abf1fd5919d6238ee3bc5eb4a9b6c3947caa6638 upstream. It isn't enough to check whether a grant is still being in use by calling gnttab_query_foreign_access(), as a mapping could be realized by the other side just after having called that function. In case the call was done in preparation of revoking a grant it is better to do so via gnttab_end_foreign_access_ref() and check the success of that operation instead. For the ring allocation use alloc_pages_exact() in order to avoid high order pages in case of a multi-page ring. If a grant wasn't unmapped by the backend without persistent grants being used, set the device state to "error". This is CVE-2022-23036 / part of XSA-396. Reported-by: Demi Marie Obenour <demi@invisiblethingslab.com> Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/xen-netfront.c')
0 files changed, 0 insertions, 0 deletions