-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Qubes vm-sudo documentation write-up against sudo passwords inside App Qubes outdated #8823
Comments
See also discussion in QubesOS/qubes-doc#1365 It's hard for me to guess @marmarek's opinion on this. It might be easier to just update. Discussion might require more time than updating it.
Rewrite for more professional language. Also no need to use all code tags for the write-up. I am approaching this from a viewpoint how such a write-up would look nowadays if written from scratch with the knowledge we have nowadays.
Rewrite because sudo hardening makes sense. By sudo hardening I mean having VMs that by user discipline on purpose never get root / never run commands with sudo / su. This makes sense for example for VMs supposed to be only used by lets say a web browser or e-mail client. Was revised as per #2695 (comment) as it apparently is harder to break out of a VM without root / kernel level access. Could be rewritten to "Root account isolation, VMs that never have access to root are more secure because this might prevent some cases of VM escape vulnerabilities."
Need to keep mentioning that an attacker having compromised user but not root is in many cases already considered catastrophic by the user. For example, if a VM to run gpg that holds the private keys compromised, then the keys are gone. Root access by the malware would not make that worse unless the malware uses this for the purpose of VM escape to compromise other VMs too. However in other cases such as low priority youtube watching VM, malware trapped as user without root access would be a security benefit.
Delete because this opinion was revised as far as I understand.
Delete because a multi-layered security approach where user volunteer non-root enforcement for some VMs is being used is sensible.
Delete because outdated. It's best to just delete wrong/outdated information. And the burden to update these numbers should not be on the contributors deleting outdated information. If someone thinks the number of Xen bugs is relevant, this could be re-added later.
Not sure if outdated, still true or speculation. In doubt, delete. Just keep true, concise, relevant statements.
True.
Delete because this issue has been resolved.
Delete because this issue has been resolved in Wayland? And Qubes not using Wayland yet is a bug (or missing feature) in Qubes. Also not relevant for VMs that never use sudo by user set policy.
Delete because Joanna isn't here to defend, update this viewpoint anymore and might have revised it meanwhile anyhow. (#2695 (comment)) |
Related issue: #7237 |
Considering this forum thread, I would like to mention a few things for consideration here: In regards to the particular "WTF document": Strictly speaking, it is a quote of a code comment. Code documentation and user documentation are different things, having different qualities, different purpose and different classes of readers. As it is now, it does not seem to qualify for either. It is hyperbolic, includes cynicism and does not provide an actual in-depth explanation of the security logic (as discussed in the forum thread and as many failed to understand). It kind of says that as long as Xen is protected, nothing else matters, including the user data in the AppVM. While that has certain validity, it cannot be the essence, as data is the central reason of computing. If the logic is that we must be ready to dump data just to avoid a "security theater", we can as well stop using computers (because of Intel ME, etc.) What I mean is that the implication that the AppVM is either perfectly clean or must be dumped as a whole, implies also that security is either 0 or 100%, which is impossible. So, this document needs to clarify from user data viewpoint:
Then, one can understand for oneself what to do, not merely be told "you are free to do what you like" without knowing why and without understanding the consequences. User documentation should not be there just because of its author (who we all surely respect) and should not be a holy scripture not to be questioned by anyone. So far, as it seems, all threads trying to discuss it result in meaningless repetition of pro- and anti- positions without much healthy reasoning. However, even the author herself seems willing to change the current default in the issue that @adrelanos linked to. IIUC, it is just not clear how to do it properly. Even that seems disregarded by most of the proponents. Also, the popular mantra that the documentation is a "community effort" does not apply to code comments. So, this must be documented properly, not just placed as a sensationalist statement. |
@unman in QubesOS/qubes-doc#1365 (comment)
In #2695 (comment) Joanna said:
This is something where I would guess that @marmarek also agrees. If so, then this revises the currently stated viewpoint in Qubes documentation:
Hence I used the words "highly outdated, since revised viewpoints". Makes sense? |
Already possible via the sudo authotization via Qrexec, that does not invalidate the document and you have to opt-in. It is not the default because Qubes Team does not agree it increases security.
It was not revised in that comment, it is more "steps to accomplish" such thing. It still stands that with current authorization mechanism, privilege escalation is still possible
We've seen that privilege escalation vulnerabilities to root account is quite frequent while VM escape is less frequent. From what I understood, if one can escape the VM, they can escape the normal user account and putting this barrier just make it more difficult to use Qubes for normal users that won't just do browsing and e-mail client, but will want to install a single package in the template and won't understand that they need to use
Not a security benefit in Qubes architecture as of today, again linking to Marmarek response:
Please point out where.
Can you please rephrase your argument, I did not understand it.
Agreed, easy to get outdated.
Not outdated, not especulation and not doubt. Privilege escalation vulnerability published 2024-01-30, less than a month ago, affecting Fedora
It is still true, concise and relevant.
Do not remove because Qubes is not using Wayland. When Qubes starts using it, this point can be revised. The comment about "not relevant for VMs that never use sudo by user set policy" is not true, Flatpak for example, still uses pkexec.
It was written in mail format, it is her signature, gives credibility to the author and I don't see this stopping this discussion happening with any other Qubes developer or community, as it is just happening in this issue and many others. |
Considering
- usability is a goal
- restricted root can still be beneficial (otherwise Joanna would not consider it)
is it not possible to have restricted root ON by default in domUs and confirm root access through a dialog box (like we allow e.g. inter-VM file copy)? If that is possible, then probably it can also be controlled via policy in dom0?
|
@emanruse Right now, various devices under There are a couple of alternatives:
|
The security of non-root enforcement generally It's futile to argue that non-root enforcement cannot improve the security of the system (in case of Qubes, of an App Qube). Non-root enforcement is the industry standard for Android [1], iOS and any locked down Linux based operating system. Status of Qubes Documentation
Xorg issues?
Usability issues? That's a different thing. There is A) security and B) usability. These are related but different. These should not be mixed. In theory it might be the case that A), non-root improvement improves security but it cannot or should not be implemented because that would be infeasible usability wise. I don't think that is true either but I want to focus on the security argument. An Implementation of non-root Enforcement in Qubes Users just need to know their YouTube-Firefox App Qube should never be grated root rights. A solution with good usability and user freedom would be if the user could opt-in "non-root enforcement" in Qubes dom0 App Qube settings using QVMM (Qubes VM Manager). Once enabled, it would be impossible for such VMs to gain root access. (Unless the user would undo this setting in dom0, which could be secured by a proper warning. Or you could even "fuse" the setting if you must.) But how about application installation, which requires root? That would still be done in Template. Elaborated in the next chapter. But Android is Different...? [1] But Android is different because app installation is possible without root rights? Yes, but Qubes could accomplish something similar.
In result this would mean for example for a YouTube-Firefox App Qube:
The would be more secure. Then Qubes would be closer to some of the security features which are standard in other operating systems such as Android. But in Android the application can be shared with multiple user accounts? Yes. And in Qubes it could be shared with multiple App Qubes. Really could be quite a similar design. User forgotten sudo/root password usability issue
Answers
I think this is a more complex design, less secure, harder to develop compared to the strictly non-root enforcement Qubes dom0 setting for App Qubes.
This I am not sure about. [2] Qubes dom0 controlled non-root enforcement setting (as described above) + xorg fix (Wayland) + /dev/xen issues fix + any other required fixes = security benefit from non-root enforcement? @marmarek
All I want is the Qubes documentation to acknolwedge what I think the fact is: non-root enforcement if done right (with all the auxiliary required fixes) would improve the security. It's okay to admit that future development is required, the feature being rejected even but at least should be factually correct, see above [2].
This The malicious code would need to wait forever because it would never happen. I am sure there are many (power) users who would understand that their browser, e-mail App Qube using software from repository package sources has no reason to request root ever.
None of these complicated commands are required. Template could always have root access. App Qube could have a non-root enforcement setting in dom0.
Not as if today but could be a benefit in the future if the auxiliary issues get resolved.
We can actually keep that sentence
No extra steps possible in my proposal here.
Security can be multi-layered.
The user could volunteer, speak opt-in, to enable non-root enforcement for some App Qubes. There's no need to argue against multi-layered security concepts. Just because there is Qubes App Qube isolation, doesn't mean other security features should be neglected.
Ok, nvm that part.
Then it can be amended to mention the future, Wayland.
An initial implementation of the non-root enforcement design which I suggested here could be implemented while fully disabling pkexec. Not a blocker. Pkexec support could be considered, improved later once basic consensus has been reached.
Once anything from a quote was modified (except for minor formatting), then it should be no longer claimed the author said exactly that. At most it could be said "this write-up was based on [source] by [author] and modified for this website" to stay truthful. Credibility is established by being on the Qubes website. In other places on the Qubes website there's neither specific authorship recognition. I am suggesting for the Qubes website to update, improve the statement. |
https://www.qubes-os.org/doc/vm-sudo/ is outdated.
The comment
This is evidenced by file
/etc/sudoers.d/qubes
which previously had this comment, having nowadays this comment removed. That write-up was just a copy of/etc/sudoers.d/qubes
.Already in 2017, Joanna upgraded her viewpoint, see:
#2695 (comment)
This ticket is still open, which means Qubes would be open if the community would implement this.
The text was updated successfully, but these errors were encountered: