JoaoJandre commented on PR #12758: URL: https://github.com/apache/cloudstack/pull/12758#issuecomment-7226003153
> Hi @JoaoJandre > > A heads-up, as a courtesy before I open a small documentation PR that touches the KBOSS backup validation added here. > > The "execute script" validation step runs the configured command inside the validation VM through the QEMU guest agent's `guest-exec` (`LibvirtValidateKbossVmCommandWrapper`). Nothing is wrong with the code. The issue is what `guest-exec` means for the guest: when it is enabled, **anyone with access to the KVM host can run any program in that VM as root (Linux) or SYSTEM (Windows), with no guest login.** With `guest-file-*` also enabled, they can read or overwrite any file: `/etc/shadow`, database files, private keys, the files on a LUKS or BitLocker volume while the VM is running. > > **Most distribution packages enable all of this by default today**, and it is being discussed upstream on qemu-devel, where Daniel Berrangé agreed that exec, file access and password/SSH-key injection should be off by default. Operators who harden their images (an allow list without `guest-exec`) will see the script step fail, and users who turn `guest-exec` back on just for this check open the whole VM to the host. > > What I'd like to add to the KBOSS docs, wherever the validation steps are described, is a neutral note along these lines: > > > The script validation step uses the QEMU guest agent command `guest-exec`. Many hardened images, and some cloud operators, disable `guest-exec`, because it lets anyone with access to the KVM host run any program inside the VM as root or SYSTEM. If `guest-exec` is disabled in the guest, this step cannot run; the boot and screenshot checks still work. Enable `guest-exec` only if you accept that exposure. > > Are you fine with that, or would you prefer different wording? Happy to adjust before I open the PR, or to let you open it yourself if you prefer. > > Thanks, Andrija Hello, @andrijapanicsb I see no problem with the note. However, I think the last note is not necessary, as the KBOSS documentation should not advise users to enable or disable the guest-exec. I think merely mentioning that it will not work without it is ok. As you said, disabling it is a opt-in (for now at least), and I would expect users to know what they are doing when disabling this. That being said, I would leave the note as: ``` The script validation step uses the QEMU guest agent command `guest-exec`. Many hardened images, and some cloud operators, disable `guest-exec`, because it lets anyone with access to the KVM host run any program inside the VM as root or SYSTEM. If `guest-exec` is disabled in the guest, this step cannot run; the boot and screenshot checks still work. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
