Juergen Gross 33172ab50a xen/scsifront: don't use gnttab_query_foreign_access() for mapped status
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_try_end_foreign_access() and check the
success of that operation instead.

This is CVE-2022-23038 / part of XSA-396.

Reported-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
V2:
- use gnttab_try_end_foreign_access()
2022-03-07 09:48:54 +01:00
..
2020-03-11 23:07:59 -04:00
2021-11-05 08:42:02 -07:00
2022-01-14 14:37:34 +01:00
2022-01-22 10:24:02 +02:00
2021-01-22 21:14:08 -05:00
2021-01-22 21:14:07 -05:00
2021-01-22 21:14:08 -05:00
2022-01-14 14:37:34 +01:00
2020-03-11 23:07:59 -04:00
2020-09-02 22:49:06 -04:00
2021-10-16 21:45:56 -04:00
2021-04-13 00:20:48 -04:00
2020-12-07 20:24:09 -05:00
2021-10-16 21:29:15 -04:00
2022-01-25 00:09:41 -05:00
2020-12-07 20:24:09 -05:00
2021-05-21 16:59:33 -04:00
2021-03-24 23:03:43 -04:00
2022-01-14 14:37:34 +01:00
2022-01-22 10:24:02 +02:00
2022-01-22 08:33:37 +02:00
2022-01-14 14:37:34 +01:00
2022-01-22 10:24:02 +02:00
2021-12-22 23:41:13 -05:00
2022-01-14 14:37:34 +01:00
2020-02-24 15:01:57 -05:00
2021-08-23 12:54:30 -06:00
2021-04-13 00:20:48 -04:00