Skip to contentSkip to conversation

MODSIGN: Kernel module signing

PATCH Bodo Eggert 1 participant 1 message Feb 16, 2007 4 messages not in the archive Crypto API

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 15 lines · Roman Zippel
Quoted 4 lines · David Howells
Quoted 3 lines

This is really the weak point - it offers no advantage over an equivalent implementation in user space (e.g. in the module tools). So why has to be done in the kernel?

Quoted 8 lines

Because the init_module() system call is the common point of module submission
to the kernel, not any particular userspace program. There is no requirement for userspace to load a module by invoking a module tools program or library, and so userspace can bypass the checks entirely by just calling init_module().
Assume for a moment that you can't trust userspace... (Obviously, if you can't trust the kernel then you're already stuffed.)

Quoted 2 lines

All the security stuff in the kernel should provide the necessary means to restrict this system call.

Hardening a system should include deeper layers, too.

Quoted 10 lines
Quoted 7 lines

It is possible to protect /dev/mem and /dev/kmem or make them unavailable and it is possible to protect the kernel's memory whilst it is running (provided you don't have nommu or broken hardware and you don't let userspace concoct any DMA request it likes) which mostly closes those other vectors I mentioned.
This isn't something I intended to look at with this patch. Those are separate holes.

Exactly and as long as there are these holes, these patches are only kernel bloat.

Off cause there are other ways to expose the kernel, but they can be plugged, too, one by one. You wouldn't leave your door open just because your window is open, while leaving the window open because the door is open.

Quoted 1 line

The simple verification can also be done in userspace and

You may verify in userspace, but you can't use the result.

OTOH, having 1000 lines of code to verify a module _is_ bloat for this task. Remove a 0 and it should be plenty (not counting the help text).

Quoted 1 line

module signing offers no real security.

It offers security against a class of attacks.

Quoted 2 lines

What real value do these patches provide, that can't be reached via other means?

It provides an extra layer of security: If an exploit allows execution of insmod(userstring), it can't compromise kernel internals.

Quoted 1 line

Who else than distributions would be interested in this?

How large is the userbase _not_ using a distribution? And are they unable to unselect [X] Signes modules support?

Quoted 3 lines

Pretty
much any use you initially mentioned can be done in simpler ways, e.g. anyone afraid of modules simply disables module loading completely.

That would work if there was no need for modules. Unfortunately some people are doomed with external modules, or not experienced enough to customize their system. Those could benefit from a sysctl(?) saying "unsigned_modules = taint|disallow".

Signature · 4 lines
Whenever you have plenty of ammo, you never miss. Whenever you are low on
ammo, you can't hit the broad side of a barn.

Friß, Spammer: [email protected]