Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harden sd-viewer configuration and provision mailcap default rules; bump version #661

Merged
merged 4 commits into from
Mar 10, 2021

Conversation

eloquence
Copy link
Member

Status

Ready for review

Description of Changes

Side effects of RPC policy change

There should not be any negative impact from restricting the GetImageRGBA policy across SecureDrop Workstation VMs. qvm-convert-img will no longer work in, e.g., sd-devices, but qvm-convert-pdf already does not work due to our existing qubes.PdfConvert policy. If we want to support PDF/image conversion in disposable VMs in future, that will require its own configuration.

Test plan

Note: Mailcap configuration testing is handled in freedomofpress/securedrop-builder#221, which is dependent on this PR, and therefore not covered below.

  1. Ensure your SecureDrop Workstation environment is provisioned to Qubes 4.0.4 (up-to-date 4.0.3 system is equivalent to 4.0.4) running a staging or production build without custom modifications.
  2. Open your development VM and check out this PR's branch.
  3. In your securedrop-workstation checkout in dom0, run make clone to build and fetch a fresh RPM.
  4. In your dom0 checkout, enter the directory rpm-build/RPMS/noarch. There should be a 0.5.3 RPM. Install it via sudo dnf install securedrop-workstation-dom0-config-0.5.3-1.fc25.noarch.rpm.
  5. Force a graphical updater run with /opt/securedrop/launcher/sdw-launcher.py --skip-delta 0 in dom0.
  6. Open any file in a disposable VM using the SecureDrop Client. While the disposable VM is running, open a terminal inside of it using the domain manager.
    • Observe that the file opens without problems.
  7. In the terminal, type qrexec-client-vm ‘@dispvm’ qubes.GetImageRGBA < /dev/urandom
  8. Observe that you see the output Request refused and that no disposable VM is opened.
  9. In dom0, run qvm-prefs sd-viewer default_dispvm.
    • Observe empty output (not sd-viewer)
  10. In your securedrop-workstation directory, ensure that config.json is present, then run make test
    • Observe that the newly added RPC policy test and the test_sd_viewer_config are passing.
  11. Launch a terminal in sd-log
    • Observe that qrexec-client-vm ‘@dispvm’ qubes.GetImageRGBA < /dev/urandom does not open a disposable VM.

eloquence and others added 4 commits March 9, 2021 17:51
- Ensures no default disposable VM is configured
- Prevents qubes.GetImageRGBA calls, which could be used to
  open disposable VMs. This policy is applied to all
  SecureDrop Workstation VMs, as this RPC call is not
  required by any current VMs.
The updater must perform a full state run in order to apply the mailcap
hardening inside AppVM private volumes. Create the necessary
run-everything flag via RPM postinst. The updater logic will
automatically clean up the flags are it runs. We'll need to remove this
logic from postinst in the subsequent release of
'securedrop-workstation-dom0-config', so it doesn't recreate the flag.
@conorsch conorsch self-requested a review March 10, 2021 18:11
Copy link
Contributor

@conorsch conorsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving these changes based on prior functional review.

@conorsch conorsch merged commit 3531b6f into main Mar 10, 2021
cfm pushed a commit that referenced this pull request Apr 1, 2024
 Harden sd-viewer configuration and provision mailcap default rules; bump version
@legoktm legoktm deleted the config-hardening branch May 28, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants