diff options
| author | Juergen Gross <jgross@suse.com> | 2022-02-25 16:05:41 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-11 10:15:12 +0100 |
| commit | 423a3a50dce9a48d10d2d2a70cd2f78064c13703 (patch) | |
| tree | de9b77aa6a5154d1877ed828ace4445033325d22 /include/linux/skb_array.h | |
| parent | 17659846fe336366b1663194f5669d10f5947f53 (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 'include/linux/skb_array.h')
0 files changed, 0 insertions, 0 deletions
