Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 816882 (CVE-2021-28702, XSA-386) - <app-emulation/xen-{4.14.3-r1,4.15.1-r1}: DoS or privilege escalation if guest has RMRR PCI devices
Summary: <app-emulation/xen-{4.14.3-r1,4.15.1-r1}: DoS or privilege escalation if gues...
Alias: CVE-2021-28702, XSA-386
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Security
Whiteboard: B1 [glsa?]
Keywords: PullRequest
Depends on: 819072
  Show dependency tree
Reported: 2021-10-07 19:28 UTC by John Helmert III
Modified: 2021-12-18 01:13 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2021-10-07 19:28:47 UTC

Certain PCI devices in a system might be assigned Reserved Memory
Regions (specified via Reserved Memory Region Reporting, "RMRR").
These are typically used for platform tasks such as legacy USB

If such a device is passed through to a guest, then on guest shutdown
the device is not properly deassigned.  The IOMMU configuration for
these devices which are not properly deassigned ends up pointing to a
freed data structure, including the IO Pagetables.

Subsequent DMA or interrupts from the device will have unpredictable
behaviour, ranging from IOMMU faults to memory corruption.

This bug has existed since at least Xen 4.4 But it was previously
masked by a tangentially-related misbehaviour; that misbehaviour was
corrected in f591755823a7
 IOMMU/PCI: don't let domain cleanup continue when device de-assignment failed
which was backported to supported stable branches.


Administrators of guests which have been assigned RMRR-using PCI
devices can cause denial of service and other problems, possibly
including escalation of privilege.


For stable Xen releases: 4.13.4, 4.14.3 and 4.15.1 are vulnerable.
Other versions of Xen released by the Xen Project are not affected.
Comment 1 Larry the Git Cow gentoo-dev 2021-10-20 09:59:36 UTC
The bug has been referenced in the following commit(s):

commit 78d3124bdd04e9ccc71dd98aebf63d940e9032ca
Author:     Tomáš Mózes <>
AuthorDate: 2021-10-12 06:39:39 +0000
Commit:     Sam James <>
CommitDate: 2021-10-20 09:59:23 +0000

    app-emulation/xen: add upstream security patches
    Signed-off-by: Tomáš Mózes <>
    Signed-off-by: Sam James <>

 app-emulation/xen/Manifest             |   2 +
 app-emulation/xen/xen-4.14.3-r1.ebuild | 167 +++++++++++++++++++++++++++++++++
 app-emulation/xen/xen-4.15.1-r1.ebuild | 167 +++++++++++++++++++++++++++++++++
 3 files changed, 336 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2021-11-12 13:04:04 UTC
The bug has been referenced in the following commit(s):

commit abb409bcf43be1f9ce250459f6dbf126b1dcf50d
Author:     Tomáš Mózes <>
AuthorDate: 2021-11-04 14:28:57 +0000
Commit:     Joonas Niilola <>
CommitDate: 2021-11-12 13:03:54 +0000

    app-emulation/xen: drop vulnerable
    Signed-off-by: Tomáš Mózes <>
    Signed-off-by: Joonas Niilola <>

 app-emulation/xen/xen-4.14.3.ebuild | 167 ------------------------------------
 1 file changed, 167 deletions(-)
Comment 3 Tomáš Mózes 2021-12-18 01:13:17 UTC
This is done, tree clean.