Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

/usr/src/linux/certs/signing_key.pem

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
Alverstone
n00b
n00b
Posts: 30
Joined: Mon Apr 28, 2025 9:34 am

/usr/src/linux/certs/signing_key.pem

  • Quote

Post by Alverstone » Wed Dec 10, 2025 6:10 am

Gentoo wiki advises me to remove this file if I use compile-time generated keys for signing modules, despite this file having 600 root:root permissions, and despite me needing it to sign out of tree modules. Ahem? Anyone can unburden my conscience?
I do not know why I bother
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Wed Dec 10, 2025 1:47 pm

When referencing advice from the Wiki, please link to the exact page in question, so that we can see what it says. In this case, searching for signing_key yields no hits, and searching for signing returns numerous clearly extraneous hints (GnuPG, binary packages, etc. - all good information, but not applicable to your question).

With the caveat that I could not find, and therefore could not read, the Wiki's advice, I can speculate. Signing keys should be kept as secret as possible, because if the key becomes known, then the signature requirement offers very little value. Generating the key for use at compile time, using it to sign the modules you build, and then discarding it maximizes the secrecy. Retaining the key risks that it could be used to sign other modules after the build is over. Yes, if you use out of tree modules, then you need to keep the key around until you have signed them. Consider not using out-of-tree modules, which would avoid this conflict.
Top
Alverstone
n00b
n00b
Posts: 30
Joined: Mon Apr 28, 2025 9:34 am

  • Quote

Post by Alverstone » Wed Dec 10, 2025 4:01 pm

Yeah had to cook my brain a bit to find it again myself.
https://wiki.gentoo.org/wiki/Signed_ker ... signatures

Anyway this reads rather paranoid to me, nobody except root can read the key, and nobody except root can load any modules anyway. I don't see why keeping it around is such a problem, especially in comparison to disabling the modules-sign USE flag.

And no, I won't stop using my out-of-tree modules. Not that I'm using a lot of them, but I won't give them up.
I do not know why I bother
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Wed Dec 10, 2025 4:11 pm

The Wiki directly justifies this. Malware with root privileges could read a root-owned file. A malicious kernel module without a proper signature cannot be loaded, even by root. A malicious kernel module with the proper signature can be loaded by root. Therefore, if you are concerned about malware that obtains root privilege, and want to prevent it from escalating to kernel privilege, you need to deny even root the ability to read this key. Deleting the key is the easiest way to deny root that access.

From the other direction, what threat(s) prompted you to enable module signing? If your threat model supposes that no attacker has root privilege, then what attack could a non-root attacker make on a no-signing kernel that is blocked by your signing-enforced kernel?
Top
Alverstone
n00b
n00b
Posts: 30
Joined: Mon Apr 28, 2025 9:34 am

  • Quote

Post by Alverstone » Wed Dec 10, 2025 6:42 pm

I enabled it just because I could. I don't know what kind of threat model assumes compromised root user. Certainly not my poor desktop system.

On that note, DKMS doesn't seem to play along so maybe I'll disable it after all. :?
I do not know why I bother
Top
Post Reply

5 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic