-
-
Notifications
You must be signed in to change notification settings - Fork 52
Description
Qubes OS release
Qubes OS 4.3
Brief summary
qvm-features-request and qubes-core-admin exhibits very strange failure patterns if you call qvm-features-request from inside a template and try to set a key-value pair with a value that contains a space. In essence:
- Setting a key-value pair to a value without a space works.
- Setting a key-value pair to a value that contains a space fails.
- If you try to set a key-value pair to a value that contains a space, subsequent attempts to set a key-value pair to a value without a space may fail.
So far the behavior pattern seems to be reproducible, but somewhat unpredictable.
Steps to reproduce
- In dom0, kill the qubesd service with
sudo systemctl stop qubesd. - In dom0, launch qubesd in a terminal with
sudo /usr/bin/qubesd -vvfor debugging. - Launch a template VM, it doesn't matter which one. I'm using
fedora-41-xfce, butdebian-12-xfcealso works. - Run the following set of eight
qvm-features-requestcommands, one at a time:
Call 1: Run qvm-features-request abc=def --commit.
Call 2: Run qvm-features-request abc.def=def --commit.
Call 3: Run qvm-features-request abc="def ghi" --commit.
Call 4: Run qvm-features-request abc.def=def --commit.
Call 5: Run qvm-features-request abc=def --commit.
Call 6: Run qvm-features-request abc.def=def --commit.
Call 7: Run qvm-features-request abc.def="def ghi" --commit.
Call 8: Run qvm-features-request abc.def=def --commit.
Expected behavior
All qvm-features-request calls should exit non-zero, regardless of whether they contain spaces or not. The calls should ultimately be no-ops since dom0 has no code to actually set the requested features.
Actual behavior
The following pattern is exhibited, with anomalies bolded:
Call 1: Succeeds.
Call 2: Succeeds.
Call 3: Fails.
Call 4: Fails (even though the value doesn't contain a space).
Call 5: Succeeds.
Call 6: Succeeds (apparently the previous success somehow got this case un-stuck?)
Call 7: Fails.
Call 8: Succeeds (maybe because we're dealing with the same key in both calls 7 and 8?)
Additional information
Every time a successful call is made, qubesd outputs a log message similar to qubes.utils: Renamed file: '/var/lib/qubes/qubes.xml~XXXXXXX' -> '/var/lib/qubes/qubes.xml' (where XXXXXXX are what appear to be random characters). Every time a failed call is made, qubesd outputs a log message like app: permission denied for call b'qubes.FeaturesRequest'+b'' (b'fedora-41-xfce' -> b'dom0') with payload of 0 bytes.