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

change Qubes network policy, UpdatesProxy to network disabled by default for better leak-proofness #3994

Open
adrelanos opened this issue Jun 14, 2018 · 5 comments
Labels
C: core C: Whonix This issue impacts Qubes-Whonix P: major Priority: major. Between "default" and "critical" in severity. privacy This issue pertains to data or information privacy through technological means. 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 14, 2018

Qubes OS version:

R4 and above

Affected component(s):

dom0, Whonix

Steps to reproduce the behavior:

Set NetVM of anon-whonix to default (sys-net).

Then use system default networking curl.anondist-orig https://check.torproject.org or otherwise to connect to clearnet.

Expected behavior:

Secure defaults. No clearnet connections possible through small user configuration mistake / oversight.

Actual behavior:

Insecure defaults. Clearnet leak.

General notes:

Qubes UpdatesProxy mechanism currently is more likely to produce a leak in future. A leak as in a user expecting to have connections torified while these are over clearnet.

The problem is, that https://github.com/QubesOS/qubes-core-admin/blob/master/qubes-rpc-policy/qubes.UpdatesProxy.policy by default says $type:TemplateVM $default allow,target=sys-net. And sys-net traffic isn't torified by default. Therefore, if any of the following goes wrong (salt / tags / qvm-features maybe / qubes-core-admin-addon-whonix), Whonix TemplateVMs might connect through clearnet. Would be better if qubes.UpdatesProxy.policy only included $anyvm $anyvm deny and then opt-in each and every TemplateVM rather than an opt-out approach.

When the user wants torification, the default non-torification setting needs to be overwritten. This is done by salt:

And then there is also https://github.com/QubesOS/qubes-core-admin-addon-whonix.

The user accidentally setting a whonix-ws based AppVM such as anon-whonix to NetVM default (sys-net) results in curl.anondist-orig https://check.torproject.org being able to reach it over clearnet. This is a huge disadvantage over the VirtualBox version of Whonix where such mistakes are very very unlikely to happen. (Because the Whonix-Workstation VirtualBox version of Whonix has only an internal network card (in internal network whonix) - which cannot accidentally connect to clearnet.)


Qubes-Whonix has code to detect wrongly configured Qubes updates proxy settings and refuses to upgrade but that's just a workaround and more complexity (possible including bugs leading to situations where users cannot upgrade or false-positive warnings).

There's also whonixcheck --leak-tests.

It's not a real fix, not as strong as a technical guarantee as it could be.


It's a complex design and interaction. Hard to fully understand (more so the more time passes). Prone for bugs in future or user mistake.

In summary, Qubes default and technical design currently is: network-enabled, clearnet, options to change to network-disabled or torified

For better control of connections the technical design should be: non-networked by default and then opt-in networking by using salt / core-admin-addon's.

@adrelanos
Copy link
Member Author

adrelanos commented Jun 14, 2018

Let's see why VirtualBox ova files handle this better.

  • these contain the VM images
  • these also contain the VM settings
  • the workstation can have a setting like "may connect to another VirtualBox VM only" (internal networking) (so no external networking to clearnet)
  • at the same time, easily downloadable VirtualBox VMs with proxying capabilities are rare
  • at the same time, VirtualBox has no easy interface to change from networking "Whonix" to "clearnet" or "other proxying capable VirtualBox VM"
  • so the two Whonix VMs, gateway and workstation are "tied together"

By Qubes design:

  • more flexible, easy to change NetVM (to clearnet, VPN, Whonix)
  • more easily available networking VMS (clearnet, VPN, Whonix)
  • template packages don't also ship (network) settings files
  • (network) settings are up to other components (qubes-core-admin-addon-whonix, salt)
  • in conclusion, are "more loosely tied to each other from a technical implementation viewpoint"

Perhaps the Qubes design could be improved? Perhaps some sort of marker / tag "Whonix" would be ingrained (settings file shipped) with the template packages which would enforce at dom0 level that these can only interact with each other, unless the user clicks through some warning?

That wouldn't solve Updates Proxy but maybe it's a start.

@andrewdavidwong andrewdavidwong added T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. C: core P: major Priority: major. Between "default" and "critical" in severity. privacy This issue pertains to data or information privacy through technological means. C: Whonix This issue impacts Qubes-Whonix labels Jun 14, 2018
@andrewdavidwong andrewdavidwong added this to the Release 4.1 milestone Jun 14, 2018
@adrelanos
Copy link
Member Author

Ping @marmarek.

@nyxnor
Copy link

nyxnor commented Jul 11, 2022

Comment removed as it is an unrelated issue, still anyone can see in the edits.

@nyxnor
Copy link

nyxnor commented Jul 13, 2022

My humble opinion is the first post need to be rewritten to clarify what this issue is about, so people can view it with different eyes.
I had troubles understanding it as well as Andrew also had.

@adrelanos
Copy link
Member Author

Happy to improve it but I re-read it just now and not sure I'll have ideas to make it more clear. Let's see...

Do you understand it now better? If yes... May I suggest... Please feel free to copy it to the forums or wiki. Then make change suggestions, ask questions and/or edit it yourself. Once an improved ticket has been decried, I can replace the original post here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core C: Whonix This issue impacts Qubes-Whonix P: major Priority: major. Between "default" and "critical" in severity. privacy This issue pertains to data or information privacy through technological means. 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