-
Notifications
You must be signed in to change notification settings - Fork 46
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
Automate the creation of grsecurity template using Qubes Builder #109
Comments
I've made some good progress with the template creation thanks to @conorsch 's help on the infra side. Here is a rough walkthrough of how to build a grsec kernel debian based template vm
The template rpm package is in
It takes 3-5 mins to install, after which you will have a
Currently the template itself does not have hvm set as virt mode, and kernel is set to the qubes default. I can't seem to find a workaround at this time. |
Struggling to reproduce the results here. A bit of clarification on the setup instructions is warranted. Perhaps we can pair on this briefly, @emkll, to tag-team the documentation in this issue? If you and I both agree the docs are sufficiently clear, then we can turn it over to the rest of the team to reproduce. At a high level, here are some of the problems I encountered:
Happy to sit down with you and piece the bits together. Perhaps after standup tomorrow, we can pair in real-time to sort it out. |
Progress! Paired with @emkll briefly today and sorted out a few blockers. Will outline some clarifications here for others trying to reproduce the work above. Volume resizing woesAs reported above, I was unable to resize the root partition on in the "work" VM on my Qubes system. Even after installing all available dom0 updates (using stable repos), the recommended volume resize command showed an error. After patching locally, I got past the failing type error, but was informed that the root partition on the work VM was readonly. Details below. Detailed errors on qvm-volume resize operation[user@dom0 ~]$ qvm-volume resize work:root 20g From Jul 18 14:54:06 dom0 qubesd[2213]: Traceback (most recent call last): The command that worked in the end was:
That's about four times the default private volume size. Used that number when it appeared that twice the normal size wasn't sufficient (disk utilization on the rw partition inside the work VM passed 95% during build). Builder dependenciesThe
The final |
Success! Fussed with volumes for a while until extension was successful; Qubes rewards perseverance. Was able to generate a ~700MB RPM, which expanded to ~3GB upon install in dom0. Created a new VM as instructed above, and confirmed that the latest grsec kernel was indeed running. Also confirmed network access as a sanity check, but performed no other investigation into VM functionality. As far as the "automation" spirit of this ticket, we have the process documented in this discussion thread, but no easily reproducible script. I suggest:
Thoughts? |
Thanks @conorsch for the careful testing, I agree we should write a script to wrap the builder commands. I will try to get a PR up against this repo before the current sprint ends. I have created some follow up tickets as well as updated some existing tickets based on research work done in this task:
|
Build logic for the template is now available in this repo: https://github.com/freedomofpress/qubes-template-securedrop-workstation, and a build script is introduced in #115 . |
^^ this is in the README file of the new repo, but it does not tell where this has to be done. In |
Good point @kushaldas , these public keys are needed in the AppVM that builds the template (or the split-gpg VM, if applicable). At the moment this script generates unsigned. Will update the docs |
Through the work in #104 we learned that it is feasible to run grsecurity-enabled VMs as template HVMs in Qubes OS. The memory overhead of HVMs (as opposed to PVH-based VMs) is a bit higher but not prohibitively so. The next step is to automate the creation of grsecurity template HVMs using Qubes Builder. This will result in RPM packages that can be installed in
dom0
.Since we don't fully understand what's involved yet, we have timeboxed this task to 16 hours for the 7/11-7/25 sprint. If it's not completed by the end of the timebox, @emkll (who will likely continue to work on this) will post an update here.
Note that this still gets us only part of the way to transitioning to grsecurity VMs (esp. for the
sd-svs
andsd-journalist
VMs); we will still have to figure out the distribution/update strategy we want to use for these packages.The text was updated successfully, but these errors were encountered: