Package: libvirt-clients
Version: 3.0.0-4+deb9u3
Severity: grave
Justification: causes serious data loss

A user that is familiar with the vol-resize command may inadvertently assume that virsh will protect them against data loss when using blockresize.

The 'virsh vol-resize' command (applicable to offline virtual machines) has sanity checks prior to shrinking a volume.

If a new size is proposed that is smaller than the current size, the following error message is produced: error: invalid argument: Can't shrink capacity below current capacity unless shrink flag explicitly specified

The 'virsh blockresize' command (applicable to online virtual machines), however, will happily accept any proposed new size, even if it is smaller than the current size. It will execute without prior warning and without requiring specific confirmation or flag.

Unintentional volume shrinking leads to data loss/corrupted filesystems. It should require user confirmation, as occurs for vol-resize.

Reply via email to