]> git.proxmox.com Git - qemu-server.git/commit
remote migration: fix online migration via API clients master
authorFiona Ebner <f.ebner@proxmox.com>
Wed, 4 Sep 2024 11:12:31 +0000 (13:12 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 6 Sep 2024 17:02:46 +0000 (19:02 +0200)
commitea4c1ccb2ccc1e2a83f2bd6f28759b76faa19b23
tree2e798ac7da314e9e96a951ecacbd8eb55cfaff02
parent00d68b8d1a166e03d59b7dffde50f960063bb2fb
remote migration: fix online migration via API clients

As reported in the community forum [0], when a remote migration
request comes in via an API client, the -T flag for Perl is set, so an
insecure dependency in a call like unlink() in forward_unix_socket()
will fail with:

> failed to write forwarding command - Insecure dependency in unlink while running with -T switch

To fix it, untaint the problematic socket addresses coming from the
remote side. Require that all sockets are below '/run/qemu-server/'
and end with '.migrate' with the main socket being matched more
strictly. This allows extensions in the future while still being quite
strict.

[0]: https://forum.proxmox.com/threads/123048/post-691958

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/QemuMigrate.pm