Skip to content

Allow spaces in values for qvm-features-request #9775

@ArrayBolt3

Description

@ArrayBolt3

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

  1. In dom0, kill the qubesd service with sudo systemctl stop qubesd.
  2. In dom0, launch qubesd in a terminal with sudo /usr/bin/qubesd -vv for debugging.
  3. Launch a template VM, it doesn't matter which one. I'm using fedora-41-xfce, but debian-12-xfce also works.
  4. Run the following set of eight qvm-features-request commands, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: coreThis issue pertains to a Qubes core component.P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.affects-4.3This issue affects Qubes OS 4.3.diagnosedTechnical diagnosis of this issue has been performed.pr submittedA pull request has been submitted for this issue.r4.2-host-stabler4.2-stabler4.3-host-cur-test

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions