public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eugene Teo <eteo@redhat.com>
To: Martin Pitt <martin.pitt@ubuntu.com>
Cc: Neil Horman <nhorman@tuxdriver.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	jeremy@goop.org, wwoods@redhat.com
Subject: Re: [PATCH 0/3] core_pattern: cleaned up repost/continuing post of core_pattern enhancements
Date: Mon, 30 Jul 2007 07:45:39 +0800	[thread overview]
Message-ID: <46AD26A3.4090606@redhat.com> (raw)
In-Reply-To: <20070729155300.GC5794@piware.de>

Hi Martin,

Martin Pitt wrote:
> Eugene Teo [2007-07-29 21:03 +0800]:
>>>> Also, it is probably good to think how we can "drop privileges" while piping
>>>> the core dump output to an external program. A malicious user can potentially
>>>> use it as a possible backdoor since anything that is executed by "|program" will
>>>> be executed with root privileges.
>>>>
>>> It was my understanding that apport already did this.
>> I haven't looked at apport yet, but are you talking about the userspace portion of
>> apport or the kernel changes in the Ubuntu kernel?
> 
> Similarly to Neil's patches, the Ubuntu kernel calls the userspace
> helper as root, too. Apport drops privileges to the target process as
> soon as possible (there are a few things it needs to do before, like
> opening an fd to the crash file in /var/crash/ if that is only
> writeable by root).

Just sharing some thoughts. Wouldn't it be more logical to drop the privileges first,
then call the userspace helper program? I know that this will limit tools like apport
to be able to read and/or write files that are only writable by root, but there ought
to be a better way to do this? What if the program piped is not a legitimate program?

Also, maybe it is good to make this portion of the code optional too, so that if no
one is using this "ispipe" feature, we just turn it off.

Eugene

  reply	other threads:[~2007-07-29 23:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-27 20:00 [PATCH 0/3] core_pattern: cleaned up repost/continuing post of core_pattern enhancements Neil Horman
2007-07-29 10:40 ` Eugene Teo
2007-07-29 12:14   ` Neil Horman
2007-07-29 13:03     ` Eugene Teo
2007-07-29 15:53       ` Martin Pitt
2007-07-29 23:45         ` Eugene Teo [this message]
2007-07-30  0:54           ` Neil Horman

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=46AD26A3.4090606@redhat.com \
    --to=eteo@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.pitt@ubuntu.com \
    --cc=nhorman@tuxdriver.com \
    --cc=wwoods@redhat.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