A bug in Starwind StarLVM plugin when making a snapshot on ProxmoxVE with Include RAM enabled

Software-based VM-centric and flash-friendly VM storage + free version
Post Reply
nvanaert
Posts: 4
Joined: Tue Jul 14, 2026 6:39 am

Mon Aug 24, 2026 12:01 pm

image.png
image.png (18.12 KiB) Viewed 5115 times
There's one statement, inserted in alloc_image right after $psize = $psize - $free; in /usr/share/perl5/PVE/Storage/Custom/StarLvmPlugin.pm.

A suggested fix for the issue (by Claude and seems to be working):

Code: Select all

          if ($free < $psize) {
              $psize = $psize - $free;
              # untaint: $free is derived from `lvs` output, so $psize is tainted and
              # PVE's daemons run under perl -T. int() does NOT untaint - only a regex
              # capture does. Without this, run_command() dies in IPC::Open3.
              ($psize) = ($psize =~ /^(\d+)(?:\.\d+)?$/)
                  or die "unexpected thin pool extend size for '$vg/$pool'\n";
              $cmd = ['/sbin/lvresize', '-L', "+${psize}k", "$vg/$pool"];
              run_command($cmd, errmsg => "lvresize thin pool '$vg/$pool' to ${psize}k error");
          }
A regex capture is the only thing that clears Perl it's taint flag normally, which is exactly what the int() wrapper fails to do. The optional (?:\.\d+)? group truncates rather than dying if a build ever hands it a float — in 1.1.41 $psize is always integer KiB, so it's belt-and-braces.

Claude's test results:
I've verified it end to end, not just asserted:

in=84398080 -> psize=23580672 tainted=NO exec OK
in=84398080.5 -> psize=23580672 tainted=NO exec OK

Same code path that died with Insecure dependency in exec before the patch.
yaroslav (staff)
Staff
Posts: 4443
Joined: Mon Nov 18, 2019 11:11 am

Mon Aug 24, 2026 5:02 pm

Thanks for reporting. Could you please also share the proxmox version that you are using?
yaroslav (staff)
Staff
Posts: 4443
Joined: Mon Nov 18, 2019 11:11 am

Tue Sep 08, 2026 10:52 am

My colleagues were unable to reproduce the issue.
Please tell me more about
-hardware you use and the storage that is backed by StarLVM (hardware, protocol it is connected with).
-Proxmox version.
-Plugin version.

Thanks!
rhp
Posts: 15
Joined: Mon Jun 08, 2026 12:13 pm

Wed Sep 09, 2026 7:35 am

We are experiencing this exact same issue.
It seems that the StarLvmPlugin.pm is missing some untainting calls.
At the moment we have patched the file to include this (similar to the original poster), but it would be better if this is included in a next release of the StarLvmPlugin.pm module.

We can provide the patched file if so requested.
yaroslav (staff)
Staff
Posts: 4443
Joined: Mon Nov 18, 2019 11:11 am

Wed Sep 09, 2026 9:25 am

Thanks for your update.
Please tell me more about
-hardware you use and the storage that is backed by StarLVM (hardware, protocol it is connected with).
-Proxmox version.
-Plugin version.
rhp
Posts: 15
Joined: Mon Jun 08, 2026 12:13 pm

Wed Sep 09, 2026 9:44 am

We are using Proxmox VE 9.2.4 with starwind-proxmox-plugin-pve9 1.1.41.
The connection to the underlying storage is over iSCSI to a Dell EqualLogic storage array.
yaroslav (staff)
Staff
Posts: 4443
Joined: Mon Nov 18, 2019 11:11 am

Wed Sep 09, 2026 10:44 am

Thanks.
Post Reply