Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • QEMU QEMU
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 741
    • Issues 741
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • QEMUQEMU
  • QEMUQEMU
  • Issues
  • #646
Closed
Open
Issue created Sep 28, 2021 by Mauro Matteo Cascella@mauromatteo.cascella

Infinite loop in xhci_ring_chain_length() in hw/usb/hcd-xhci.c (CVE-2020-14394)

Host environment

  • Operating system: Fedora 33

  • OS/kernel version: 5.13.16-100.fc33.x86_64

  • Architecture: x86

  • QEMU flavor: qemu-system-x86_64

  • QEMU version: 6.1.50 (v6.1.0-861-g22651bced7)

  • QEMU command line:

    ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 4G -device nec-usb-xhci,id=xhci,slots=64 -device usb-tablet,bus=xhci.0,port=1,id=usbdev1 -hda fedora32.qcow2

Emulated/Virtualized environment

  • Operating system: Fedora 32
  • OS/kernel version: 5.11.22-100.fc32.x86_64
  • Architecture: x86

Description of problem

An infinite loop issue was found in the USB xHCI controller emulation of QEMU. Specifically, function xhci_ring_chain_length() in hw/usb/hcd-xhci.c may get stuck while fetching empty TRBs from guest memory, since the exit conditions of the loop depend on values that are fully controlled by guest. A privileged guest user may exploit this issue to hang the QEMU process on the host, resulting in a denial of service.

Steps to reproduce

Build and load xhci.ko from within the guest:

  1. make
  2. insmod xhci.ko

Makefile

usb-xhci.h

xhci.c

Additional information

This issue was reported by Gaoning Pan (Zhejiang University) and Xingwei Li (Ant Security Light-Year Lab).

RH bug: https://bugzilla.redhat.com/show_bug.cgi?id=1908004.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking