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

Create sys-ops-whonix VM for Enhanced Security and Isolation in Qubes-Whonix #9294

Open
4 tasks
adrelanos opened this issue Jun 8, 2024 · 3 comments
Open
4 tasks
Labels
C: Whonix This issue impacts Qubes-Whonix P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. security This issue pertains to the security of Qubes OS. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.

Comments

@adrelanos
Copy link
Member

adrelanos commented Jun 8, 2024

The problem you're addressing (if any)

Currently the Whonix-Gateway sys-whonix,

    1. is being used as the service qube for UpdatesProxy (Qrexec service) for Qubes-Whonix,
    1. can be used as UpdatesProxy for other Templates,
    1. can be used as updatevm (global preference for dom0 updates),
    1. can in the future be used as clockvm (global preference).

This is non-ideal for security and anonymity.

The main issue of having these services running is it undermines the proxy isolation of Whonix-Gateway and Whonix-Workstation separation.

In case of non-Whonix, clearnet use, where it is fine to use sys-firewall for those tasks, even though it is a Net Qube, sys-firewall is not the qube for proxy settings as well as sys-whonix is not the qube for running Qubes services, which is a task for a Whonix-Workstation, not a Whonix-Gateway, for better leak-proofness.

A vulnerability in tinyproxy marked as CVE-2023-49606 states that a specially crafted HTTP header could lead to remote code execution. In the Qubes case of using sys-whonix for hosting the tinyproxy, compromise of the Gateway means compromise of the user identity.

The solution you'd like

sys-ops-whonix - UpdatesProxy, UpdateVM, ClockVM - a new, dedicated service VM.

Proposal: An App Qube or named Disposable Whonix-Workstation with the name sys-ops-whonix

The sys-ops-whonix would be based on the Whonix-Workstation Template and its Net Qube will be set to
sys-whonix by default.

The value to a user, and who that user might be

Better security and higher leak-proofness of Qubes-Whonix.

Details

  • Why not use anon-whonix as sys-ops-whonix (UpdatesProxy, UpdateVM, ClockVM)? Because anon-whonix is intended for user interaction with applications such as Tor Browser. It is an App Qube.
    • On the other hand, sys-ops-whonix would be a service qube.
    • App Qubes and service qubes have different threat models, attack surface. A compromised Tor Browser should not lead to a compromised Qubes UpdatesProxy (tinyproxy) and vice versa. That is why these should run inside different VMs.
  • sys-ops-whonix default Qubes dom0 AppMenu: User applications would be removed from the app menu and Tor Browser would be prevented from starting.
  • App Qube vs named disposable: The qube can be a named disposable, configured just like sys-net and sys-firewall can be disposables with Salt declarations. A persistent sys-ops-whonix can be interesting for caching purposes of UpdatesProxy, but that is not a Qubes default and is unnecessary for clockvm and updatevm. Making sys-ops-whonix persistent for the purpose of cacher would be a task for a cacher Salt state.

The name sys-ops-whonix

To make clear what the VM's function is, the VM's name should probably start with sys- and should also include whonix.

sys-whonix-ops would perhaps be more easily confused with sys-whonix.

ops standing for operations. What operations? UpdatesProxy, UpdateVM, ClockVM.

If the name is non-ideal, suggestions are welcome.

Completion criteria checklist

The migration would involve:

  • Creation of the sys-ops-whonix qube with Salt.
  • Make sure that Salt state is also called when using the Anaconda installer when installing Qubes-Whonix.
  • Rename of mentions in Qubes source code that hard code sys-whonix for sys-ops-whonix when appropriate.
  • Possibly other modifications that will be discovered when implementation starts.
@adrelanos adrelanos added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. labels Jun 8, 2024
@andrewdavidwong andrewdavidwong added C: Whonix This issue impacts Qubes-Whonix security This issue pertains to the security of Qubes OS. labels Jun 10, 2024
@adrelanos
Copy link
Member Author

There's a contributor available to implement this security enhancement.

However, since this would involve the creation of an additional VM that would be installed by default for users who opt-in to install Qubes-Whonix and therfore some extra system resource use, I suppose this feature might require approval by the Qubes core team before it's worth implementing this?

In other words...
Currently maybe blocked by: Qubes core team approval

@andrewdavidwong andrewdavidwong added the S: question Status: question. In order to determine the status of this issue, an open question must be answered. label Jun 21, 2024
@adrelanos
Copy link
Member Author

Ping @marmarek.

@marmarek
Copy link
Member

I like the idea. Possibly also for non-whonix use case. Using sys-firewall/sys-whonix for updates proxy is convenient, because it is already there, but all the reasons you gave are very good to not do it. Plus, it's incompatible with non-Linux sys-firewall (looking at MirageOS for sys-firewall).

@andrewdavidwong andrewdavidwong removed the S: question Status: question. In order to determine the status of this issue, an open question must be answered. label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Whonix This issue impacts Qubes-Whonix P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. security This issue pertains to the security of Qubes OS. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

No branches or pull requests

3 participants