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 Linux Kernel Runtime Guard (LKRG) easily available in Qubes #5461

Open
adrelanos opened this issue Nov 15, 2019 · 21 comments
Open

make Linux Kernel Runtime Guard (LKRG) easily available in Qubes #5461

adrelanos opened this issue Nov 15, 2019 · 21 comments
Labels
C: kernel 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 Nov 15, 2019

The problem you're addressing (if any)
Yet unknown, upcoming kernel vulnerabilities.

Describe the solution you'd like
Linux Kernel Runtime Guard (LKRG)

Where is the value to a user, and who might that user be?
LKRG improves the security of the kernel. Therefore makes VM escapes harder.

The main argument for LKRG being: it renders whole classes of kernel exploits ineffective, makes other exploits less reliable / more difficult to write. LKRG was developed by a security professional with review from other high profile security professionals. References for that, you can read more about LKRG here:
https://www.whonix.org/wiki/Linux_Kernel_Runtime_Guard_LKRG

Describe alternatives you've considered

There's no real alternative as far as I know, just hardening coming from different approaches.

Related, non-duplicate issues


Might be prudent to make this an optionally installable package at first. Then encourage wider testing. If all goes well, installation by default could be considered.

@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 Nov 15, 2019
@andrewdavidwong andrewdavidwong added C: kernel security This issue pertains to the security of Qubes OS. labels Nov 17, 2019
@andrewdavidwong andrewdavidwong added this to the Far in the future milestone Nov 17, 2019
@adrelanos
Copy link
Member Author

@fepitre
Copy link
Member

fepitre commented Dec 4, 2019

If it helps, I can do the Fedora side of packaging and testing.

@adrelanos
Copy link
Member Author

Yes, sure.

@fepitre
Copy link
Member

fepitre commented Dec 4, 2019

If you don't mind, I'm just assigning myself for tracking the issue for this part of the work.

@fepitre fepitre self-assigned this Dec 4, 2019
@adrelanos
Copy link
Member Author

I am OK with that. For me, anything that moves this forward. :) (But I am not a github admin.)

@fepitre
Copy link
Member

fepitre commented Nov 29, 2021

@adrelanos I've loaded the module into one of my Fedora based qube. Is there any particular tests I can execute to validate it works as expected? Maybe some malicious attacks or such?

@adrelanos
Copy link
Member Author

I am not an expert for LKRG. Just a packager. I'd suggest to look that up upstream.

@fepitre
Copy link
Member

fepitre commented Nov 29, 2021

@marmarek I was thinking to do like dummy-psu or dummy-backlight, having a separate component that would be built for templates (really straightforward) but including it as a submodule for linux-kernel without loading it by default. What do you think?

@DemiMarie
Copy link

This would be an especially good fit for KVM-based Qubes OS.

@marmarek
Copy link
Member

marmarek commented Nov 29, 2021

@marmarek I was thinking to do like dummy-psu or dummy-backlight, having a separate component that would be built for templates (really straightforward) but including it as a submodule for linux-kernel without loading it by default. What do you think?

Yes, I think that is a good idea. It makes it easier accessible when someone wants to use it.

@fepitre
Copy link
Member

fepitre commented Dec 3, 2021

I've prepared a Fedora version here: fepitre/fedora-lkrg@8ec1918. I'm waiting feedback from Fedora/RPMFusion people if they are interested to have it directly in their repositories.

@fepitre fepitre changed the title make Linux Kernel Runtime Guard (LKRG) easily avaialble in Qubes make Linux Kernel Runtime Guard (LKRG) easily available in Qubes Dec 3, 2021
@TommyTran732
Copy link

@fepitre It has been awhile now... did they give you any feedback?

@fepitre
Copy link
Member

fepitre commented May 24, 2022

@fepitre It has been awhile now... did they give you any feedback?

Yes, it's just me lacking time to go into the whole integration process for a new package etc. I also would like to have more feedback from Fedora user people than just packaging it for one person. I'll update to the latest version and build it with COPR soon.

@TommyTran732
Copy link

Awesome!

@fepitre
Copy link
Member

fepitre commented May 26, 2022

I've built a COPR repo with version 0.9.3 https://copr.fedorainfracloud.org/coprs/fepitre/lkrg/. You can install it by doing in a Fedora VM:

$ sudo dnf copr enable fepitre/lkrg
$ sudo dnf install lkrg-kmod

You may wait few secs and then

$ sudo systemctl start lkrg

Try systemctl restart if it fails the first time.

@andrewdavidwong
Copy link
Member

I've built a COPR repo with version 0.9.3 https://copr.fedorainfracloud.org/coprs/fepitre/lkrg/. You can install it by doing in a Fedora VM: [...]

@fepitre, does this mean that this issue is complete?

@fepitre
Copy link
Member

fepitre commented May 26, 2022

Not completely. For now, I can either provide it by maintaining it on a COPR repository or submitting on rpmfusion repositories but the latter needs me more time to get on review process. That's the Fedora case. For Debian, we need to provide it so I guess we can package the whole as usual for both. @marmarek what do you think?

@TommyTran732
Copy link

@fepitre Do you mind bumping the LKRG version on the COPR? It is a couple versions behind now :)

@fepitre
Copy link
Member

fepitre commented Aug 15, 2022

@fepitre Do you mind bumping the LKRG version on the COPR? It is a couple versions behind now :)

Sure. How things are going on Fedora with it?

@TommyTran732
Copy link

@fepitre Do you mind bumping the LKRG version on the COPR? It is a couple versions behind now :)

Sure. How things are going on Fedora with it?

It works okay, though annoyingly dnf copr does not automatically get proxied through http://127.0.0.1:8082 in the template VM

@fepitre
Copy link
Member

fepitre commented Aug 15, 2022

It's updated.

@andrewdavidwong andrewdavidwong removed this from the Release TBD milestone Aug 13, 2023
@fepitre fepitre removed their assignment Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: kernel 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

6 participants