andrijapanicsb commented on PR #12758:
URL: https://github.com/apache/cloudstack/pull/12758#issuecomment-7225822672

   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


-- 
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]

Reply via email to