lkml.org 
[lkml]   [2013]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] binfmt_elf: Verify signature of signed elf binary
From
Date
On Wed, 2013-01-16 at 13:28 -0500, Vivek Goyal wrote:
> On Wed, Jan 16, 2013 at 01:08:35PM -0500, Mimi Zohar wrote:
> > On Wed, 2013-01-16 at 11:34 -0500, Vivek Goyal wrote:
> >
> > > I read the comment in ima_bprm_check() being called from security_bprm_check().
> > > It says that files already open for write can't executed and files already
> > > open for exec can't be open for writes. That's fine.
> > >
> > > I was worried about anonymous pages being modified on swap and then
> > > faulted back in. It is not necessarily signature verification but making
> > > sure signed processes memory is not modified later by any unsigned process
> > > in anyway. And that includes disabling ptrace too.
> > >
> > > So IMA stuff does not do anything to protect against process memory being
> > > modified using ptrace or by playing tricks with swap.
> >
> > > I am not sure what will happen if I can bypass the file system and directly
> > > write on a disk block and modify executable. (Assuming one can get block
> > > information somehow). Does anything protect such modification? Will IMA
> > > detect it?
> >
> > Sorry, this is out of scope for IMA. Dmitry has looked into this, but
> > I'm not sure where it stands at the moment.
>
> Ok, so that's one reason that why I wrote these patcehs. IMA currently
> is not doing following things to make sure address space of signed images
> is not modified by others.
>
> - Protecting against modifications to pages on swap.
> - Protecting against modifications by ptrace.
> - Protecting against modifications which bypassed filesystem and directly
> wrote to the block.
>
> Locking down all the pages of signed binaries in memory hopefully should
> solve above problems.

Signing and verifying ELF executables goes back a long time ~2003/4,
from a number of esteemed kernel developers, including Greg-KH and Serge
Hallyn.

IMA-appraisal isn't limited to appraising a single type of file, but is
a generic mechanism for appraising all files. If there are issues that
aren't being addressed, then by all means, please help by addressing
them. Duplicating a large portion of the code is not productive.

thanks,

Mimi




\
 
 \ /
  Last update: 2013-01-16 21:02    [W:0.072 / U:1.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site