-
Notifications
You must be signed in to change notification settings - Fork 176
Open
Description
Today dkms sources the dkms.conf, effectively treating it as a shell script instead of data/configuration file.
That in itself isn't great since:
- it can have code flow relying on dkms internals or altering code flow
- in some cases dkms needs to be run as root
- dkms.conf recipes are not always thoroughly reviewed by maintainers/users
Combining the above, we end up with a substantial surface for misuse/abuse and co.
One rather benign example is #413 where dos<>unix line endings result in fatal breakage.
@xuzhen has already done a ton of great work here - see #265.
IMHO to unwrap/finish this completely we should:
- standardize dkms.conf - flesh out a separate man page, version(?) and add some unit tests
- select a set of linux distributions and briefly audit for dkms.conf shell abuse - off the top of my head zfs and Kernel match for BUILT_MODULE_NAME #392
- evaluate if there's an alternative - reach out to respective parties
- detect and warn when shell abuse is detected in dkms.conf
- define transitionary period - reach out to affected distros/projects
- once period is over, release dkms 4 making it a hard error
- aside: should probably check and promote other warnings to fatal errors
@xuzhen @scaronni @anbe42 what do you think of this idea? If you know of any projects/packages where this will be a problem, can you share some details - name, distro/upstream URL, etc.
Thanks o/
Metadata
Metadata
Assignees
Labels
No labels