FS#75212 - [dkms] module signing is broken
Attached to Project:
Arch Linux
Opened by Maximiliano Curia (maxy) - Saturday, 02 July 2022, 10:22 GMT
Last edited by Sébastien Luttringer (seblu) - Friday, 15 July 2022, 21:24 GMT
Opened by Maximiliano Curia (maxy) - Saturday, 02 July 2022, 10:22 GMT
Last edited by Sébastien Luttringer (seblu) - Friday, 15 July 2022, 21:24 GMT
|
Details
Description: failing to use sign-file due to
3323033dfdc5f58afc303736f6b580bf62442ef7
version: 3.0.5-1 Not affected with 3.0.3 Upstream report: https://github.com/dell/dkms/issues/229 Steps to reproduce: - Install any dkms module - While building the module, dkms will try to sign it, but since the sign_file variable is not set it tries to execute a non existing command. |
This task depends upon
Closed by Sébastien Luttringer (seblu)
Friday, 15 July 2022, 21:24 GMT
Reason for closing: Fixed
Additional comments about closing: dkms-3.0.5-2
Friday, 15 July 2022, 21:24 GMT
Reason for closing: Fixed
Additional comments about closing: dkms-3.0.5-2
https://github.com/dell/dkms/pull/230
==> Starting prepare()...
-> Applying patch 230.patch
patching file dkms.in
patching file dkms.in
Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file dkms.in.rej
However, this should:
sed -i 's/sha512/sha512sum/g' "$pkgname.in"
Is this an issue only for users who enforce module signature with module.sig_enforce=1?
Is setting module.sig_enforce=0 a workaround?
The problem is the authors converted from `kmodsign` (which I, as a non-UEFI user do not have installed) so the previous code properly stopped trying to sign a module if that was missing.
```
sign_build()
{
[[ -x "$(command -v kmodsign)" && -d "/var/lib/shim-signed/mok/" ]] || return
```
The newly updated code just sets up `do_signing` regardless of any missing tools, so it's more broken than just one missing variable -- on my system it simply should not be trying to sign any modules at all as it's a BIOS boot, not UEFI (meaning the new broken code for missing `sign_file` should not even be reached, the new code breaks the logic).
https://github.com/dell/dkms/issues/162
sign_file='/usr/lib/modules/${kernelver}/build/scripts/sign-file'
The single quotes are necessary because $kernelver is not yet set when the configuration files are sourced.
https://github.com/dell/dkms/blob/187980ac51650b02225f9a13a7ed99b8e01d062c/dkms_framework.conf#L28
sign_file='/usr/lib/modules/${kernelver}/build/scripts/sign-file'
Rebuild with the patch above helps too.
(13/27) Install DKMS modules
==> dkms install --no-depmod vboxhost/6.1.35_non_OSE -k 5.18.9-arch1-1
/usr/bin/dkms: line 1033: sha512: command not found
/usr/bin/dkms: line 1033: sha512: command not found
/usr/bin/dkms: line 1033: sha512: command not found
without third-party programs, downgrade can be done using pacman itself:
sudo pacman -U https://archive.archlinux.org/packages/d/dkms/dkms-3.0.3-1-any.pkg.tar.zst
and just tell pacman to keep old dkms version
to file
/etc/pacman.conf
add line (or add dkms if IgnorePkg list is not empty)
IgnorePkg = dkms
then when you know the problem is solved - tell pacman to stop ignoring dkms updates by removing that line or package name.
I early applied https://github.com/dell/dkms/pull/230.
I have no secure boot system, so please confirm it's a good fix.
works for me, with dkms-3.0.5-2 does not have the initially described issue.