From: Pavel Machek <pavel@ucw.cz>
To: Reiner Sailer <sailer@us.ibm.com>
Cc: Emilyr@us.ibm.com, James Morris <jmorris@redhat.com>,
Kylene@us.ibm.com, linux-kernel@vger.kernel.org,
linux-security-module@wirex.com, Toml@us.ibm.com,
Valdis.Kletnieks@vt.edu
Subject: Re: [PATCH 2 of 4] ima: related Makefile compile order change and Readme
Date: Wed, 25 May 2005 17:06:01 +0200 [thread overview]
Message-ID: <20050525150601.GB4375@elf.ucw.cz> (raw)
In-Reply-To: <Pine.WNT.4.63.0505251046450.696@laptop>
Hi!
> > Maybe I'm just wrong... I definitely chosen bad example (grub) because
> > it is also bootloader...
> >
> > > (iv) From then on, the IMA in the kernel is responsible for measuring
> > > executables/modules before loading them and for maintaining the
> > > measurement list and its TPM aggregate.
> >
> > Kernel does not know what is exacutable and what is data. Thanks to
> > buffer overflows, the line between executable and data is extremely
> > blury.
> >
> > Now, to my argumentation. Imagine bootscripts containing
> > "show_etc_issue" command. (That shows /etc/issue). If there's buffer
> > overflow in "show_etc_issue" command, it is *not* security issue as of
> > now, because it only works on data provided by root. But it becomes
> > issue when IMA system is in use, because now /etc/issue can be used to
> > inject code into system; something that was not possible before.
> >
> > OTOH buffer overrun in show_etc_issue is certainly bad thing, because
> > it is unexpected behaviour; and if IMA means such stuff is fixed...
> >
> > It just seems like a lot of work. You are basically adding check at
> > every place where user can
> > shoot_himself_in_the_foot^W^W^W^W^Wdo_something_stupid_to_system_security
> > . I suspect many config files can be used to compromise system
> > security...
>
> Pavel, I cannot follow your argumentation. Could you please expand on how
> measuring a script file would affect existing buffer overflows at all?
>
> Just to make sure we are in sync how user space measurements work, here
> a summary at the bash example:
>
> (i) bash at point x opens "show_etc_issue" and holds file descriptor in
> fd_show
>
> (ii) before bash reads the commands from fd_show, we insert a line of code
> writing fd_show down into the kernel (this is a fixed size data
> structure)
>
> (iii) IMA hook in the kernel now reads the whole file building a SHA1
> (there is no interpretation of any content of any file here)
>
> (iv) IMA decides whether the measurement of the file must be stored or
> whether it is already in the measurement list etc.
>
> (v) writing fd_show returns to bash
>
> (vi) bash reads the commands and executes them
>
> If I understand you, then you are claiming that steps (ii) to (v)
> introduce buffer overflows in bash or show_etc_issue. How?
No, I'm not claiming that. You are certainly *not* introducing any new
problems.
But some problems that used to be harmless (buffer overrun in
show_etc_issue command) are not harmless any more.
Pavel
next prev parent reply other threads:[~2005-05-25 15:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-25 15:00 Reiner Sailer
2005-05-25 15:06 ` Pavel Machek [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-05-25 15:32 Reiner Sailer
2005-05-25 21:58 ` Pavel Machek
2005-05-24 21:17 Reiner Sailer
2005-05-24 22:41 ` Pavel Machek
2005-05-24 13:45 Reiner Sailer
2005-05-24 18:47 ` Pavel Machek
2005-05-23 21:36 Reiner Sailer
2005-05-23 23:44 ` Pavel Machek
2005-05-23 23:59 ` James Morris
2005-05-25 18:06 ` Reiner Sailer
2005-05-23 19:56 Reiner Sailer
2005-05-23 20:39 ` Pavel Machek
2005-05-22 23:59 Reiner Sailer
2005-05-23 4:30 ` James Morris
2005-05-23 4:52 ` Valdis.Kletnieks
2005-05-23 8:58 ` Pavel Machek
2005-05-20 13:36 Reiner Sailer
2005-05-21 6:02 ` Greg KH
2005-05-22 19:37 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050525150601.GB4375@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=Emilyr@us.ibm.com \
--cc=Kylene@us.ibm.com \
--cc=Toml@us.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=jmorris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@wirex.com \
--cc=sailer@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®