lkml.org 
[lkml]   [2009]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v6] Added PR_SET_PROCTITLE_AREA option for prctl()
Date
> 
> * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
>
> > >
> > > * Bryan Donlan <bdonlan@gmail.com> wrote:
> > >
> > > > On Tue, Dec 8, 2009 at 12:38 AM, Ingo Molnar <mingo@elte.hu> wrote:
> > > > >
> > > > > * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > > > >
> > > > >> > The feature looks useful, but the choice of a prctl as an API is strange
> > > > >> > - it limits us to the current task only - while the ability to set
> > > > >> > arguments for another task looks a more generic (and potentially more
> > > > >> > useful) solution.
> > > > >>
> > > > >> No. It's impossible.
> > > > >> /proc/{pid}/cmdline read user process's memory. iow, this prctl() don't
> > > > >> receive string, it receive virtual address itself. [...]
> > > > >
> > > > > it's not 'impossible' at all, you yourself mention ptrace:
> > > >
> > > > If another process is going to use ptrace to inject the cmdline string
> > > > into the victim's address space, it can also temporarily hijack a
> > > > thread to run prctl() on its behalf...
> > >
> > > That's exactly the point i made. There's no reason not to offer the API
> > > i suggested as long as permissions are checked (as usual) - because
> > > ptrace already allows this (and more).
> >
> > Confused.
> >
> > I think ptrace don't solve the issue of explained my patch description.
>
> it doesnt. By 'this' i meant the security aspect. ptrace can already do
> almost arbitrary alteration to any task's state.

Ah, I misunderstood. Thanks correct me :)





\
 
 \ /
  Last update: 2009-12-10 01:19    [W:0.098 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site