lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+5PVA6q67PYagXD7WmSHjqPs2eF-oLWHFEWoXiugMQW8_ZUdg@mail.gmail.com>
Date:	Fri, 19 Oct 2012 07:49:24 -0400
From:	Josh Boyer <jwboyer@...il.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	David Miller <davem@...emloft.net>,
	David Howells <dhowells@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: RFC: sign the modules at install time

On Thu, Oct 18, 2012 at 9:16 PM, Rusty Russell <rusty@...tcorp.com.au> wrote:
> Josh Boyer <jwboyer@...il.com> writes:
>> On Thu, Oct 18, 2012 at 2:46 PM, Linus Torvalds
>> <torvalds@...ux-foundation.org> wrote:
>>> On Wed, Oct 17, 2012 at 10:34 PM, Rusty Russell <rusty@...tcorp.com.au> wrote:
>>>>
>>>> Hacking the keyid and signer-name to be extracted every time by
>>>> sign-file takes my modules_install time from 18.6 seconds to 19.1.  We'd
>>>> get that back easily by making sign-file a perl script anyway; it calls
>>>> out to perl 3 times already.
>>>
>>> Ok, that tiny slowdown seems worth the cleanup, especially if we'd get
>>> it back from somebody re-writing it in perl.
>>>
>>> Want to sign off on the two patches, or put them in your git tree?
>>
>> I tested Rusty's version of the 'sign modules at module_install time'
>> patch in a Fedora kernel build today.  It seems to work well enough,
>> even if we wind up signing things twice.  A brief cleanup of my patch
>> to add a modules_sign target on top of that is below.
>
> I'm surprised.  Only the first signature (create on the unstripped
> module) will be used by the kernel; this should fail to verify the
> stripped module.  A quick and dirty check is:
>
> grep -abo '~Module' /tmp/mod/lib/modules/3.7.0-rc1+/kernel/sound/pci/snd-intel8x0.ko
> 39828:~Module
> 40432:~Module
>
> Perhaps eu-strip actually strips the appended signature?

Yes.  The abbreviated flow chart is:

build
install (signed at install time now)
find-debuginfo.sh (eu-strip) which strips off the signature from above
modules_sign to put it back

You are certainly correct in that if I am building outside of RPM and
run modules_install followed by modules_sign, it will append a second
signature.

A further check could be done in scripts/Makefile.modsign to see if each
module is already signed and skip it if so.  I can take a look at doing
that next week if people think it would be worthwhile.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ