The Patching Friars' AlmanacA calendar of CVE saints

Feast day May 20

Matryoshka TrapHoly card for matryoshka-trap, generated with AI (Claude, Anthropic) for the Lunario dei Frati Patchatori.CC BY-NC-SA 4.0 DMA Matryoshka Trap DOLUS IN DOLO
🤖 Image and text generated with AI

⬇ Download holy card: ·

Embed on your site

Saint Matryoshka Trap, Trap Within the Trap

Patron of QEMU device emulation, controllers that write to themselves, and virtual machines that want out.

Life

In May 2022 researchers described the Matryoshka Trap: a set of "DMA reentrancy" flaws in QEMU's device emulation, starting with the USB EHCI controller. A guest could make a DMA transfer write into the registers of the very same controller, triggering nested actions like Russian dolls, up to corrupting the emulator's state and attempting an escape from the virtual machine to the host.

Prayer

O Saint Matryoshka Trap, who hides one attack inside another, let our emulated devices not write upon themselves. Amen.

How to celebrate

Celebrated by updating QEMU and checking that a DMA transfer does not land in the registers of the one running it.

Inside every trap, another trap.

Technical record

Disclosed on
May 20 2022
CVE
CVE-2021-3750CVE-2021-3929CVE-2021-3947
Product
QEMU

A DMA reentrancy issue was found in the USB EHCI controller emulation of QEMU. EHCI does not verify if the Buffer Pointer overlaps with its MMIO region when it transfers the USB packets. Crafted content may be written to the controller's registers and trigger undesirable actions (such as reset) while the device is still transferring packets. This can ultimately lead to a use-after-free issue. A malicious guest could use this flaw to crash the QEMU process on the host, resulting in a denial of service condition, or potentially execute arbitrary code within the context of the QEMU process on the host. This flaw affects QEMU versions before 7.0.0.

Sources: qiuhao.org · secwest.net · github.com

📅 Add to your calendar

SaintsGoogle CalendarApple, Outlook (.ics)

Observances (feasts, scourges and miracles)Google CalendarApple, Outlook (.ics)

In Google Calendar you can also paste the URL in Settings → Add calendar → From URL. The first sync can take a few hours.