Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758293Ab2JXL35 (ORCPT ); Wed, 24 Oct 2012 07:29:57 -0400 Received: from ozlabs.org ([203.10.76.45]:48089 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758242Ab2JXL3z (ORCPT ); Wed, 24 Oct 2012 07:29:55 -0400 From: Rusty Russell To: Lucas De Marchi , Kees Cook Cc: mtk.manpages@gmail.com, "H. Peter Anvin" , linux-kernel@vger.kernel.org, jonathon@jonmasters.org, "Mimi Zohar" , "Kasatkin\, Dmitry" Subject: Re: [PATCH 1/4] module: add syscall to load module from fd In-Reply-To: References: <1348179300-11653-1-git-send-email-keescook@chromium.org> <50749DE8.7010703@zytor.com> <5074A0AB.8040207@zytor.com> <87d30o7iy6.fsf@rustcorp.com.au> <87ipa8o4mn.fsf@rustcorp.com.au> <87sj97hs5e.fsf@rustcorp.com.au> User-Agent: Notmuch/0.14 (http://notmuchmail.org) Emacs/23.4.1 (i686-pc-linux-gnu) Date: Wed, 24 Oct 2012 13:36:59 +1030 Message-ID: <87d308o9f0.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1357 Lines: 31 Lucas De Marchi writes: > On Tue, Oct 23, 2012 at 1:42 PM, Kees Cook wrote: >> On Mon, Oct 22, 2012 at 9:08 PM, Lucas De Marchi >> wrote: >>> sure... but do you realize this will fail in case kernel is checking >>> module signature and we passed --force to modprobe (therefore mangled >>> the decompressed memory area)? >> >> Hm, yeah, userspace mangling of a module plus signing would fail. >> Seems like mangling and signing aren't compatible. Doing it in >> kernel-space (as now written for finit_module) solves that, but it >> means that now compression isn't possible if you need both signing and >> mangling. Signing and mangling are always incompatible, of course. Compressed modules breaks Kees' (and IMA's) requirement to have an fd attached, unless the kernel does the decompression. We have that code already, in fact. It would be easy to add a config option the recognize the compression magic and uncompress in-kernel. That would happen after the signature check, of course, and Just Work. Cheers, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/