Re: Disabling module loading with a module?

fvw (fvw@chello.nl)
Tue, 17 Aug 1999 15:58:19 +0200


On Tue, 17 Aug 1999, Matthew Kirkwood wrote:
> It's even easier than that. 2.2.11 and 2.3.12 onwards have a(n almost)
> monotonic bounding set for many privileged operations which the kernel
> kernel restricts to root (specifically, the new capability stuff).
>
> Put ~(1 << CAP_SYS_MODULE) (actually 4294901759) into
> /proc/sys/kern/cap_bset to disable the usual kernel module mechanism.
>
> Send ~(1 << CAP_SYS_RAWIO) (4294836223) in there to protect direct against
> hardware access, and /dev/port, /dev/kmem, /dev/mem and (as of 2.3.14pre1)
> /proc/kcore.
>
> With these two disabled, there should be no way to modify the kernel.
I was talking about an already crack box, and echo 0 is as easy as echo 1 :-)

> (Interesting diversion: what about systems with swappable kernel code?
> We'd have to deny access to block devices too, in that case.)
Nope, because afaik the kernel never gets swapped out.

--

Frank v Waveren fvw@chello.nl ICQ# 10074100

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/