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...
Status: IN_PROGRESS
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
URL: https://www.openwall.com/lists/oss-se...
Whiteboard: B1 [glsa?]
Keywords: PullRequest
Depends on: 819072
Blocks:
  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: ---


Attachments

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
ISSUE DESCRIPTION
=================

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
emulation.

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.

IMPACT
======

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

VULNERABLE SYSTEMS
==================

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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78d3124bdd04e9ccc71dd98aebf63d940e9032ca

commit 78d3124bdd04e9ccc71dd98aebf63d940e9032ca
Author:     Tomáš Mózes <hydrapolic@gmail.com>
AuthorDate: 2021-10-12 06:39:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-20 09:59:23 +0000

    app-emulation/xen: add upstream security patches
    
    Bug: https://bugs.gentoo.org/816882
    Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abb409bcf43be1f9ce250459f6dbf126b1dcf50d

commit abb409bcf43be1f9ce250459f6dbf126b1dcf50d
Author:     Tomáš Mózes <hydrapolic@gmail.com>
AuthorDate: 2021-11-04 14:28:57 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-11-12 13:03:54 +0000

    app-emulation/xen: drop vulnerable
    
    Bug: https://bugs.gentoo.org/816882
    Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/22816
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 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.