See how qemu compares to other vendors in security performance
An off-by-one read/write issue was found in the SDHCI device of QEMU. It occurs when reading/writing the Buffer Data Port Register in sdhcireaddataport and sdhciwritedataport, respectively, if datacount == blocksize. A malicious guest could use this flaw to crash the QEMU process on the host, resulting in a denial of service condition.
A use-after-free vulnerability was found in QEMU's 9pfs subsystem. A race condition between the main thread and a worker thread when processing concurrent Tlcreate and Twalk requests allows a malicious guest user to craft a fid path containing stale heap data, bypassing directory traversal restrictions and escaping the shared directory boundary. This can lead to arbitrary host file read/write and code execution (VM escape) as the QEMU process user.
A flaw was found in the 9p passthrough filesystem (9pfs) implementation in QEMU. When a local user in the guest writes an executable file with SUID or SGID, none of these privileged bits are correctly dropped. As a result, in rare circumstances, this flaw could be used by malicious users in the guest to elevate their privileges within the guest and help a host local user to elevate privileges on the host.
hw/ide/pci.c in QEMU before 5.1.1 can trigger a NULL pointer dereference because it lacks a pointer check before an idecanceldmasync call.
A flaw was found in QEMU, in the virtio-scsi, virtio-blk, and virtio-crypto devices. The size for virtqueuepush as set in virtioscsicompletereq / virtioblkreqcomplete / viritocryptoreqcomplete could be larger than the true size of the data which has been sent to guest. Once virtqueuepush() finally calls dmamemoryunmap to ummap the iniov, it may call the addressspacewrite function to write back the data. Some uninitialized data may exist in the bounce.buffer, leading to an information leak.
A type mismatch vulnerability was found in QEMU's vhost inflight migration VMState handling. The destination buffer size is stored as a uint64t but read by the VMSVBUFFER load path as a signed int32t. On little-endian hosts, a crafted incoming migration state with bit 31 set causes the value to be interpreted as negative and then implicitly converted to a very large sizet, leading qemugetbuffer() to copy migration-stream data beyond the bounds of the mmap-backed inflight region.
This can result in a crash of the QEMU process or memory corruption. Exploitation requires control of the migration producer or write access to the migration channel, combined with a destination configured to use vhost inflight migration.
A NULL pointer dereference flaw was found in the megasas-gen2 SCSI host bus adapter emulation of QEMU in versions before and including 6.0. This issue occurs in the megasascommandcancelled() callback function while dropping a SCSI request. This flaw allows a privileged guest user to crash the QEMU process on the host, resulting in a denial of service. The highest threat from this vulnerability is to system availability.
A flaw was found in QEMU. An assertion failure was present in the usbepget() function in hw/net/core.c when trying to get the USB endpoint from a USB device. This flaw may allow a malicious unprivileged guest user to crash the QEMU process on the host and cause a denial of service condition.
fdctrlwritedata in hw/block/fdc.c in QEMU 5.0.0 has a NULL pointer dereference via a NULL block pointer for the current drive.
The ahcicommitbuf function in ide/ahci.c in QEMU allows attackers to cause a denial of service (NULL dereference) when the command header 'ad->curcmd' is null.
A flaw was found in QEMU. The VAPIC setup hypercall in hw/i386/vapic.c does not validate that the writable RAM alias remains within the option ROM window. A privileged guest user on a Q35/KVM machine can position this alias over locked SMRAM, bypassing chipset DLCK protection and injecting code into System Management Mode memory.
- qemu 1:11.1.3+ds-1 [trixie] - qemu <no-dsa> (Minor issue) https://gitlab.com/qemu-project/qemu/-/workitems/4128 Introduced with: https://gitlab.com/qemu-project/qemu/-/commit/367071447ec5b0dabc5452384bbeb62371838112 (v0.15.0-rc0) Fixed by: https://gitlab.com/qemu-project/qemu/-/commit/4823a3093b3542834e1a4103a37f4ed9f4ad3c44 (v11.1.3) Fixed by: https://gitlab.com/qemu-project/qemu/-/commit/b4db9809f874eb6ad21d35d5b84337468d0d2cb3 (v10.0.15)
pcichangeirqlevel in hw/pci/pci.c in QEMU before 5.1.1 has a NULL pointer dereference because pcigetbus() might not return a valid pointer.
A deadlock issue was found in the AHCI controller device of QEMU. It occurs on a software reset (ahciresetport) while handling a host-to-device Register FIS (Frame Information Structure) packet from the guest. A privileged user inside the guest could use this flaw to hang the QEMU process on the host, resulting in a denial of service condition. The highest threat from this vulnerability is to system availability.
A flaw was found in QEMU's NBD block driver (block/nbd.c). A malicious NBD server can respond to a read request with a DONE-marked structured reply covering only part of the requested sector. QEMU accepts this incomplete read as successful and returns the full sector to the guest, including bytes from the uninitialized portion of a host heap buffer. This results in host QEMU process memory being disclosed to the guest VM, potentially leaking sensitive data such as credentials or other guests' data. The flaw is also reachable through the IDE buffered read path (hw/ide/core.c).
Upstream report: https://gitlab.com/qemu-project/qemu/-/workitems/3815
A flaw was found in QEMU's NBD block driver (block/nbd.c). A malicious NBD server can respond to a read request with a DONE-marked structured reply covering only part of the requested sector. QEMU accepts this incomplete read as successful and returns the full sector to the guest, including bytes from the uninitialized portion of a host heap buffer. This results in host QEMU process memory being disclosed to the guest VM, potentially leaking sensitive data such as credentials or other guests' data. The flaw is also reachable through the IDE buffered read path (hw/ide/core.c).
Upstream report: https://gitlab.com/qemu-project/qemu/-/workitems/3815
A flaw was found in QEMU's NBD server implementation. A remote, unauthenticated attacker can crash the NBD server by sending an NBDOPTSETMETACONTEXT or NBDOPTLISTMETACONTEXT request with a declared option length larger than the actual payload. The handler processes the request and sends a valid reply, but fails to validate that the full declared length was consumed, leaving residual data that triggers an assertion failure (!client->optlen) in nbd/server.c. Unlike sibling option handlers, the meta-context options lack this validation check. This affects qemu-nbd, qemu-storage-daemon, and qemu-system with the internal NBD server, from v2.12.0 onward.
Upstream report: https://gitlab.com/qemu-project/qemu/-/workitems/4843
A flaw was found in QEMU's NBD server implementation. A remote, unauthenticated attacker can crash the NBD server by sending an NBDOPTSETMETACONTEXT or NBDOPTLISTMETACONTEXT request with a declared option length larger than the actual payload. The handler processes the request and sends a valid reply, but fails to validate that the full declared length was consumed, leaving residual data that triggers an assertion failure (!client->optlen) in nbd/server.c. Unlike sibling option handlers, the meta-context options lack this validation check. This affects qemu-nbd, qemu-storage-daemon, and qemu-system with the internal NBD server, from v2.12.0 onward.
Upstream report: https://gitlab.com/qemu-project/qemu/-/workitems/4843
A flaw was found in QEMU's NBD server implementation. A remote, unauthenticated attacker can crash a multi-export NBD server by negotiating block-status metadata for one export, switching to a different export, then sending an extended BLOCKSTATUS request. This triggers an assertion failure (client->contexts.exp == client->exp) in nbdcoblockstatuspayloadread in nbd/server.c, terminating the process and all exports it serves. Exploitation requires the NBD server to be configured with at least two named exports on the same listener.
Upstream report: https://gitlab.com/qemu-project/qemu/-/workitems/3796
A flaw was found in QEMU's NBD server implementation. A remote, unauthenticated attacker can crash a multi-export NBD server by negotiating block-status metadata for one export, switching to a different export, then sending an extended BLOCKSTATUS request. This triggers an assertion failure (client->contexts.exp == client->exp) in nbdcoblockstatuspayloadread in nbd/server.c, terminating the process and all exports it serves. Exploitation requires the NBD server to be configured with at least two named exports on the same listener.
Upstream report: https://gitlab.com/qemu-project/qemu/-/workitems/3796
Hello,
I am writing to share details regarding a seccomp filter bypass pattern affecting several projects (including containerd, Podman, systemd, and QEMU) that rely on denylists for system call argument inspection.
The issue stems from an evaluation mismatch between seccomp-bpf and the Linux kernel when 32-bit integer arguments are passed via 64-bit CPU registers on 64-bit architectures.
Vulnerability Details =====================
Many system calls accept 32-bit integers as arguments. For example, the first argument to socket(2) (the address family/domain) is an 'int'. On 64-bit architectures, this argument is loaded into a 64-bit register.
When handling the system call, the kernel implicitly ignores or truncates the upper 32 bits. However, seccomp filters inspect the full 64-bit register value unless an explicit mask is applied.
When a seccomp profile implements a denylist for a specific argument value, an attacker can bypass the filter by setting non-zero bits in the upper 32 bits of the register:
1. A seccomp rule attempts to block socket creation for AFVSOCK (0x28) by matching on (arg0 == 0x28). 2. The caller passes 0x100000028 in the corresponding 64-bit register. 3. Seccomp evaluates (0x100000028 == 0x28), which evaluates to false. The denylist rule is not triggered, and seccomp allows the syscall. 4. The kernel receives the syscall, casts/truncates the argument to a 32-bit int (0x28), and creates the AFVSOCK socket.
Impact ======
Among the projects reviewed, systemd was the most significantly affected (see issue #44134). While RestrictAddressFamilies= allowed bypassing socket family restrictions, the impact on RestrictNamespaces= is particularly critical.
RestrictNamespaces= relies on seccomp to prevent services from creating or joining namespaces via unshare(2), clone(2), and setns(2). Because 32-bit flag arguments were matched without masking upper register bits, denylist configurations could be bypassed.
Remediation ===========
To prevent this bypass:
1. Argument Masking: Filters must mask 32-bit arguments to their low 32 bits before evaluating them (e.g., using SCMPCMPMASKEDEQ in libseccomp).
2. Allowlists over Denylists: Avoid denylists for system call arguments. Enforcing a strict default-deny policy with an allowlist of valid 64-bit values inherently prevents unexpected upper-bit payloads.
Documentation patches addressing this pitfall have been submitted across the libseccomp C, Go, and Rust bindings.
Background and Tooling ======================
This behavior was identified during seccomp profile analysis using seccat (a tool converting seccomp JSON to/from a compact DSL) and secprobe (a non-destructive rule testing utility leveraging seccompunotify(2) to inspect syscalls without executing them).
https://github.com/ricardobranco777/seccat
An improvement to seccomp-tools was suggested: https://github.com/david942j/seccomp-tools/issues/407
Affected Projects and References ================================
- containerd: https://github.com/containerd/containerd/issues/14348
- Podman (container-libs): https://github.com/podman-container-tools/container-libs/issues/1248
- QEMU: https://gitlab.com/qemu-project/qemu/-/workitems/4671
- systemd: https://github.com/systemd/systemd/issues/44134 https://github.com/systemd/systemd/issues/44148
Best regards, Ricardo Branco
A use-after-free vulnerability was found in QEMU's 9pfs subsystem. A race condition between the main thread and a worker thread when processing concurrent Tlcreate and Twalk requests allows a malicious guest user to craft a fid path containing stale heap data, bypassing directory traversal restrictions and escaping the shared directory boundary. This can lead to arbitrary host file read/write and code execution (VM escape) as the QEMU process user.
A flaw was found in QEMU. The VAPIC setup hypercall in hw/i386/vapic.c does not validate that the writable RAM alias remains within the option ROM window. A privileged guest user on a Q35/KVM machine can position this alias over locked SMRAM, bypassing chipset DLCK protection and injecting code into System Management Mode memory.
A flaw was found in QEMU's VAPIC (Virtual Advanced Programmable Interrupt Controller) implementation in hw/i386/vapic.c. The 16-bit VAPIC setup hypercall allows a privileged guest to specify both the base address and size of a high-priority writable RAM alias. QEMU does not validate that this alias remains within the VAPIC option ROM boundaries (0xc0000..0xdffff). A malicious guest administrator can place the alias over 0xa0000..0xbffff, bypassing the Q35 chipset's DLCK-protected SMRAM and modifying memory that executes in System Management Mode. This could allow a privileged guest user to inject arbitrary code into locked SMRAM.
Upstream fix: https://gitlab.com/qemu-project/qemu/-/commit/d61c8a6fb7388486353aa267ba0d75b098f16662
Reference: https://gitlab.com/qemu-project/qemu/-/workitems/4206
In the Linux kernel, the following vulnerability has been resolved:
KVM: arm64: vgic: Handle race between interrupt affinity change and LPI disabling
Hyunwoo Kim reports some really bad races should the following situation occur:
- LPI-I is pending in vcpu-B's AP list - vcpu-A writes to vcpu-B's RD to disable its LPIs - vcpu-C moves I from B to C
If the last two race nicely enough, vgicpruneaplist() can drop the irq and AP list locks, reacquire them, and in the interval the irq has been freed. UAF follows.
The fix is two-fold:
- Before dropping the irq and aplist locks, take a reference on the irq
- Do not try to handle migration of the pending bit: there is no expectation that this state is retained, as per the architecture
With that, we're sure that the interrupt is still around, and we safely remove it from the AP list as it has no target at this stage (unless another interrupt fires, but that's another story).
QEMU's vhost inflight migration VMState handling uses a uint64t field for the destination buffer size, while the VMSVBUFFER load path reads the field as a signed int32t. On little-endian hosts, a crafted incoming migration state with bit 31 set can cause the negative value to be converted to a very large sizet. QEMU may then copy migration-stream data beyond the mmap-backed destination inflight region, causing a destination QEMU process crash or memory corruption. Exploitation requires control of the migration producer or write access to the migration channel and a configuration using vhost inflight migration.
Acknowledgments: Seungjung Kim (Kyonggi University)
A flaw was found in the QEMU Guest Agent (qga). A local unprivileged user can exploit a vulnerability in the guest-ssh-add-authorized-keys command handler by manipulating symbolic links. This can occur either through a deterministic directory-symlink bypass or a Time-of-Check to Time-of-Use (TOCTOU) file-symlink race. Successful exploitation allows the attacker to gain ownership of arbitrary root-owned files or directories, leading to root access. This vulnerability requires an external management layer (e.g., libvirt) to trigger the affected code path.
When qmpguestsshaddauthorizedkeys adds an SSH key for an existing local user, the agent (running as root) decides whether to create the user's .ssh directory with a symlink-following directory test, and then writes and chowns the authorizedkeys file using a plain chown (not lchown). A local unprivileged user who owns their home directory can pre-stage their .ssh directory (or the authorizedkeys file) as a symbolic link so that, when the host or operator triggers a key add for that user, the root agent follows the link and transfers ownership of an arbitrary root-owned file or directory to the unprivileged user, who can then rewrite it to obtain root.
Patch: https://patchew.org/QEMU/20260709105707.91209-1-kkostiuk@redhat.com/
A flaw was found in QEMU's virtio-blk device. The issue arises because the device does not properly validate the size of input descriptors before writing data. A malicious guest with high privileges could exploit this vulnerability by submitting a malformed virtio-blk SCSI request, leading to an out-of-bounds write in the host heap memory and a potential denial of service (DoS) for the QEMU process.
QEMU's virtio-blk device can write past the end of a heap-allocated MMIO bounce buffer while handling a crafted VIRTIOBLKTSCSICMD request. A malicious guest that can program virtio-blk request descriptors can make the second-to-last writable input descriptor point to an MMIO guest physical address with a length of only 1 byte. QEMU maps that descriptor through an exact-size heap bounce buffer, then virtioblkhandlescsi() writes the 4-byte virtioscsiinhdr.errors field without first checking that the descriptor is large enough. A malicious guest can cause an out-of-bounds host heap write in the QEMU process by submitting a malformed virtio-blk SCSI request.