public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: Roger Luethi <rl@hellgate.ch>
Cc: Rob Landley <rob@landley.net>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Interesting race condition...
Date: Fri, 20 Aug 2004 06:15:09 -0400	[thread overview]
Message-ID: <1092996907.10063.91.camel@krustophenia.net> (raw)
In-Reply-To: <20040729235654.GA19664@k3.hellgate.ch>

On Thu, 2004-07-29 at 19:56, Roger Luethi wrote:
> On Thu, 22 Jul 2004 22:04:46 -0500, Rob Landley wrote:
> > I just saw a funky thing.  Here's the cut and past from the xterm...
> > 
> > [root@(none) root]# ps ax | grep hack
> >  9964 pts/1    R      0:00 grep hack HOSTNAME= SHELL=/bin/bash TERM=xterm HISTSIZE=1000 USER=root LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=
> > [root@(none) root]# ps ax | grep hack
> >  9966 pts/1    S      0:00 grep hack
> > 
> > Seems like some kind of race condition, dunno if it's in Fedore Core 1's ps
> > or the 2.6.7 kernel or what...
> 
> If somebody posted a solution for this, I didn't see it. There's a race in
> the kernel, and considering the permissions on /proc/PID/{cmdline,environ}
> a security bug as well: If you win the race with a starting process, you
> can read its environment.
> 
> This should plug the hole. Can you give it a spin?
> 

Was this ever merged?  I just hit this bug with 2.6.8.1:

rlrevell@mindpipe:~$ ps auxww | grep jack
rlrevell 10498  0.1  5.9 28656 28624 pts/0   SLl+ 06:07   0:00 jackd -n 1000000 --realtime -d alsa --rate 48000 -D -P hw:0,0 -C hw:0,2 -p 32 -S
rlrevell 10502  0.1  2.3 11432 11432 pts/2   SLl+ 06:07   0:00 jack_simple_client foo
rlrevell 10509  0.0  0.0     4    4 pts/1    R+   06:09   0:00 grep jack SSH_AGENT_PID=667 TERM=rxvt SHELL=/bin/bash CVSROOT=:pserver:anonymous@cvs.alsa-project.org:/cvsroot/alsa GTK_RC_FILES=/etc/gtk/gtkrc:/home/rlrevell/.gtkrc-1.2-gnome2 WINDOWID=33554437 USER=rlrevell LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35: GNOME_KEYRING_SOCKET=/tmp/keyring-oFgJ2h/socket SSH_AUTH_SOCK=/tmp/ssh-JvFuVGV623/agent.623 SESSION_MANAGER=local/mindpipe:/tmp/.ICE-unix/623 USERNAME=rlrevell DESKTOP_SESSION=default PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games PWD=/home/rlrevell GDMSESSION=default HISTCONTROL=ignoredups HOME=/home/rlrevell SHLVL=1 GNOME_DESKTOP_SESSION_ID=Default LOGNAME=rlrevell DISPLAY=:0.0 COLORTERM=rxvt XAUTHORITY=/home/rlrevell/.Xauthority _=/bin/grep /bin/grep    
rlrevell@mindpipe:~$ ps auxww | grep jack
rlrevell 10498  0.1  5.9 28656 28624 pts/0   SLl+ 06:07   0:00 jackd -n 1000000 --realtime -d alsa --rate 48000 -D -P hw:0,0 -C hw:0,2 -p 32 -S
rlrevell 10502  0.1  2.3 11432 11432 pts/2   SLl+ 06:07   0:00 jack_simple_client foo
rlrevell 10511  0.0  0.0  1576  464 pts/1    S+   06:09   0:00 grep jack
rlrevell@mindpipe:~$ ps auxww | grep jack
rlrevell 10498  0.1  5.9 28656 28624 pts/0   SLl+ 06:07   0:00 jackd -n 1000000 --realtime -d alsa --rate 48000 -D -P hw:0,0 -C hw:0,2 -p 32 -S
rlrevell 10502  0.1  2.3 11432 11432 pts/2   SLl+ 06:07   0:00 jack_simple_client foo
rlrevell 10513  0.0  0.0   240  124 pts/1    R+   06:09   0:00 grep jack
rlrevell@mindpipe:~$ ps auxww | grep jack
rlrevell 10498  0.1  5.9 28656 28624 pts/0   SLl+ 06:07   0:00 jackd -n 1000000 --realtime -d alsa --rate 48000 -D -P hw:0,0 -C hw:0,2 -p 32 -S
rlrevell 10502  0.1  2.3 11432 11432 pts/2   SLl+ 06:07   0:00 jack_simple_client foo
rlrevell 10515  0.0  0.0  1576  464 pts/1    S+   06:09   0:00 grep jack
rlrevell@mindpipe:~$ ps auxww | grep jack

Lee



  parent reply	other threads:[~2004-08-20 10:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23  3:04 Interesting race condition Rob Landley
2004-07-23  7:33 ` Barry K. Nathan
2004-07-23  7:56   ` Hugo Mills
2004-07-24  8:13   ` Rob Landley
2004-07-24 13:40     ` Marc Ballarin
2004-07-26 16:04       ` David Weinehall
2004-07-26 17:20       ` Marc Ballarin
2004-07-23 10:01 ` P. Benie
2004-07-24  8:17   ` Rob Landley
2004-07-24  9:08     ` P. Benie
2004-07-27 20:40     ` Bill Davidsen
2004-07-28  8:00       ` Paul Jackson
2004-08-04 20:03       ` Robert White
2004-08-04 20:42         ` Roger Luethi
2004-07-28  8:05 ` Paul Jackson
2004-07-28 11:54   ` Marc Ballarin
2004-07-28 16:46     ` Rob Landley
2004-07-28 16:42   ` Rob Landley
2004-07-28 17:08     ` Tristan Wibberley
2004-07-29 23:56 ` Roger Luethi
2004-07-30  0:18   ` Jesper Juhl
2004-07-30  0:22     ` Jesper Juhl
2004-07-30  8:27   ` Marc Ballarin
2004-07-30  8:38     ` Roger Luethi
2004-08-20 10:15   ` Lee Revell [this message]
2004-08-20 12:51     ` Marc Ballarin

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=1092996907.10063.91.camel@krustophenia.net \
    --to=rlrevell@joe-job.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rl@hellgate.ch \
    --cc=rob@landley.net \
    /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