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

Make disposable root volumes inherit read-only status from their disposable templates #6625

Open
DemiMarie opened this issue May 20, 2021 · 6 comments
Labels
C: storage P: minor Priority: minor. The lowest priority, below "default." security This issue pertains to the security of Qubes OS.

Comments

@DemiMarie
Copy link

The problem you're addressing (if any)

Currently, root volumes are read-write by default, even though the writes are thrown away after the qube is shut down. However, the data written is not encrypted with an ephemeral key, so sensitive information could persist indefinitely after it should have been deleted. QubesOS/qubes-core-admin#396 will encrypt all volatile volumes by default, but root volumes need to be read-only for maximum benefit.

Describe the solution you'd like

Root volumes should be read-only. This will cause the AppVMs to set up a dm-snapshot device that allows them to be written to, which will write the changes to the private volume. When the AppVM is shut down, the volatile volume will be securely deleted by deleting the encryption key.

Where is the value to a user, and who might that user be?

All users will benefit from improved security.

Describe alternatives you've considered

We could do something similar in dom0, but that is extra complexity.

Additional context

Relevant documentation you've consulted

Related, non-duplicate issues

#4408

@DemiMarie DemiMarie added T: enhancement P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels May 20, 2021
@ghost
Copy link

ghost commented May 20, 2021

To clarify applications running in that AppVM could still from their point of view have write access to /, correct?

As mentioned #1293 (comment) doesn't the same thing need to happen for DispVM's home volume?

@DemiMarie
Copy link
Author

To clarify applications running in that AppVM could still from their point of view have write access to /, correct?

As mentioned #1293 (comment) doesn't the same thing need to happen for DispVM's home volume?

Yes and yes. The latter will require additional support from within the DispVM.

@andrewdavidwong andrewdavidwong added C: storage security This issue pertains to the security of Qubes OS. labels May 21, 2021
@andrewdavidwong andrewdavidwong added this to the Release 4.2 milestone May 21, 2021
@DemiMarie DemiMarie self-assigned this Mar 2, 2022
@marmarek marmarek modified the milestones: Release 4.2, Release TBD Dec 12, 2022
@marmarek marmarek added the P: minor Priority: minor. The lowest priority, below "default." label Dec 12, 2022
@marmarek
Copy link
Member

Where is the value to a user, and who might that user be?

All users will benefit from improved security.

No, it makes sense only for encrypted volatile volume. And that makes sense only for rather niche threat model. For everybody else, implementing this will regress performance and likely disk usage.

@andrewdavidwong andrewdavidwong removed the P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. label May 26, 2023
@andrewdavidwong
Copy link
Member

No, it makes sense only for encrypted volatile volume. And that makes sense only for rather niche threat model. For everybody else, implementing this will regress performance and likely disk usage.

Does this mean that this is a "won't do" or that the request should be amended to change "by default" to "optionally"?

@marmarek
Copy link
Member

The initial proposal assumed the volatile encryption was enabled by default, which was later reverted.
The root volume can be switched read-only by the user already (qvm-volume config foo:root rw 0), but it's only on the VM level, we don't have global knob for that. It might make sense to tie the default to having volatile volume encrypted, but on the other hand, there may be some problematic corner cases that would be broken by such change (encrypted volatile volume for Windows maybe?).

One thing that would make sense, is the read-only root be inherited by DispVMs from their disposable template, which I think isn't the case right now.

@andrewdavidwong andrewdavidwong changed the title Make root volumes read-only by default Make disposable root volumes inherit read-only status from their disposable templates May 26, 2023
@andrewdavidwong
Copy link
Member

The initial proposal assumed the volatile encryption was enabled by default, which was later reverted. The root volume can be switched read-only by the user already (qvm-volume config foo:root rw 0), but it's only on the VM level, we don't have global knob for that. It might make sense to tie the default to having volatile volume encrypted, but on the other hand, there may be some problematic corner cases that would be broken by such change (encrypted volatile volume for Windows maybe?).

One thing that would make sense, is the read-only root be inherited by DispVMs from their disposable template, which I think isn't the case right now.

Sounds like the last part is the only thing you're confident would be a suitable enhancement right now, so I've reduced the scope of this issue down to just that. Other stuff can be opened as separate issues in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: storage P: minor Priority: minor. The lowest priority, below "default." security This issue pertains to the security of Qubes OS.
Projects
None yet
Development

No branches or pull requests

3 participants