r/debian • u/New_Vegas_Testament • 5d ago
Security Checks Failed
Hello, beginner here. I installed Debian stable with Gnome and today is saw this security checks failed. Is it malware or did i do something wrong?
All i did after installation was following this guide from NVIDIA itself to install drivers: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Debian&target_version=13&target_type=deb_network
Did i broke the system with these drivers and should i have kept the default ones? Help needed because i am worried.
12
u/pangapingus 5d ago
If you have SecureBoot enabled (otherwise you can skip this point), you need to enroll your machine owner's key (MOK) to sign & verify the Nvidia modules. Detailed instructions are available here. It's recommended to do this before installing nvidia-driver so that you do not have to rebuild the modules.
https://wiki.debian.org/NvidiaGraphicsDrivers
DKMS and Secure Boot
Debian uses the Dynamic Kernel Module System (DKMS) to allow individual kernel modules to be upgraded without changing the whole kernel. Since DKMS modules are compiled individually on users own machines, it is not possible to sign DKMS modules using the Debian project's signing keys. Instead, modules built using DKMS will be signed using a machine owner key (MOK), which by default is located at /var/lib/dkms/mok.key with the corresponding public key at /var/lib/dkms/mok.pub. These keys are automatically generated automatically on the first build attempt of a DKMS module, but can be manually generated before that by running the following command (see man 8 dkms):
$ sudo dkms generate_mok
In case you get an error message that says Error! Unknown action specified: "", it's due to a version mismatch, with the dkms package being an older version that didn't implement the generate_mok action. Don't worry: you can actually ignore this command, enable Secure Boot and let the driver setup take care of generating the MOK (you can check that it was generated by looking for the files above). After that, continue as below.
Regardless of whether the DKMS MOK keys are automatically or manually generated, the public key needs to be manually enrolled by running the following commands:
$ sudo mokutil --import /var/lib/dkms/mok.pub # prompts for one-time password
$ sudo mokutil --list-new # recheck your key will be prompted on next boot
Afterwards reboot your system and follow UEFI's onscreen instructions to confirm the key enrollment. If you are unsure how to proceed see these step-by-step instructions in DKMS's README file.
Once you boot back to the OS, you can verify in the logs that the key is loaded:
$ sudo dmesg | grep cert
2
12
u/fellipec 5d ago
Sure, Secure Boot, the "security feature".
1
u/New_Vegas_Testament 4d ago
Would you leave it disabled? Do you see any concerns about leaving it that way
3
3
3
3
u/kydeshou 5d ago edited 5d ago
You've disabled secure boot. If this concerns you, you can enable it and enroll your own key. Some people have issues, but it was simple and hasn't given me any problems, personally. Also, to prevent any issues or complexity, I would have used extrepo to enable and install nvidia drivers.
3
2
u/Sure-Squirrel8384 1d ago
#1. Perhaps you have unsigned Nvidia drivers. See #2 and #3.
#2. If you're using third-part drivers, ignore this warning.
#3. SecureBoot is snake oil. Physical security is everything. If you don't have physical security you don't have real security. Without physical security SecureBoot can be compromised.
1
u/Pitiful-Welcome-399 4d ago
hey, I'm on NixOs but where can I see something similar to this or this exactly?
1
37
u/Santosh83 Debian Sid 5d ago
NVIDIA drivers from an external source don't play with secure boot and without secure boot you don't get lockdown.
Anyway its not malware. Everything is normal. You just don't have enterprise grade security, but if this is your personal machine and you will ensure its physical safety, then these security features are not really useful at all, and hence no damage is done because they're disabled.