Public bug reported: qemu-guest-agent in Ubuntu enables every guest agent command by default, including guest-exec, guest-exec-status, guest-file-open/ read/write and guest-set-user-password.
The packaged unit runs /usr/sbin/qemu-ga with no arguments (debian/qemu-guest-agent.service, inherited from Debian), and the package ships no /etc/qemu/qemu-ga.conf. qemu-ga's built-in fallback policy is "allow everything", so anyone who can reach the agent channel from the host gets a root shell and full file access in the guest with one command. Why this matters more now: management stacks (Apache CloudStack, OpenStack, Proxmox) increasingly rely on the agent for IP reporting, boot readiness and quiesced snapshots, and migration guides tell users to install it. Ubuntu is one of the most common guest OSes on KVM, so many guests are getting this default for the first time. Comparison: - RHEL 9/10 and rebuilds ship an --allow-rpcs list without guest-exec* and guest-file-*: https://git.almalinux.org/rpms/qemu-kvm/src/branch/c9s/qemu-ga.sysconfig - Debian has the same default as Ubuntu; Debian bug #1076139 asks for a configurable/safer default: https://bugs.debian.org/1076139 - Upstream proposal for grouped restrictions (2024, not merged): https://patchwork.kernel.org/project/qemu-devel/cover/[email protected]/ - Upstream discussion on qemu-devel (November 2026): Daniel Berrangé replied that, on balance, arbitrary exec, arbitrary file read/write and password/SSH-key injection should be off by default, and that confidential guests must be locked down out of the box: https://lists.nongnu.org/archive/html/qemu-devel/2026-11/msg05850.html https://lists.nongnu.org/archive/html/qemu-devel/2026-11/msg06035.html Steps to check on any Ubuntu guest with the package installed: systemctl cat qemu-guest-agent # ExecStart has no --allow/--block qemu-ga --dump-conf # no block-rpcs / allow-rpcs # from the KVM host: virsh qemu-agent-command <vm> \ '{"execute":"guest-exec","arguments":{"path":"/usr/bin/id","capture-output":true}}' # returns a pid; guest-exec-status shows uid=0(root) Requested change (any of these would help): 1. Ship /etc/qemu/qemu-ga.conf with block-rpcs set to guest-exec, guest-exec-status and guest-file-* (the long-standing RHEL policy). libvirt IP reporting, fsfreeze snapshots and shutdown keep working. 2. At minimum, ship a commented qemu-ga.conf and document the allow-rpcs / block-rpcs options in the server guide. Andrija Panić ** Affects: qemu (Ubuntu) Importance: Undecided Status: New ** Tags: hardening security -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2178282 Title: qemu-guest-agent enables guest-exec and guest-file-* by default To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2178282/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
