|
Message-ID: <202212011520.F7FE481@keescook> Date: Thu, 1 Dec 2022 15:21:37 -0800 From: Kees Cook <keescook@...omium.org> To: Stefan Bavendiek <stefan.bavendiek@...lbox.org> Cc: kernel-hardening@...ts.openwall.com, linux-hardening@...r.kernel.org Subject: Re: Reducing runtime complexity On Thu, Dec 01, 2022 at 09:09:04PM +0100, Stefan Bavendiek wrote: > Some time ago I wrote a thesis about complexity in the Linux kernel and how to reduce it in order to limit the attack surface[1]. > While the results are unlikely to bring news to the audience here, it did indicate some possible ways to avoid exposing optional kernel features when they are not needed. > The basic idea would be to either build or configure parts of the kernel after or during the installation on a specific host. > > Distributions are commonly shipping the kernel as one large binary that includes support for nearly every hardware driver and optional feature, but the end user will normally use very little of this. > In comparison, a custom kernel build for a particular device and use case, would be significantly smaller. While the reduced complexity won't be directly linked with reduction in attack surface, from my understanding the difference would make a relevant impact. > > The question I keep wondering about is how feasible this is for general purpose distributions to have the kernel "rebuild" in this way when it is installed on a particular machine. Much of the functionality is modules, so once a system is booted and running the expected workloads, one can set the modules_disabled sysctl and block everything else from being loaded. -Kees -- Kees Cook
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.