mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Henning P. Schmiedehausen" <hps@intermeta.de>
To: linux-kernel@vger.kernel.org
Subject: [2.4] ptrace bugfix breaks strace and keeps processes in STOPPED state (was: Re: How to fix the ptrace flaw without rebooting)
Date: Sat, 5 Apr 2003 08:35:20 +0000 (UTC)	[thread overview]
Message-ID: <b6m4g8$rp1$1@tangens.hometree.net> (raw)
In-Reply-To: <1049454936.2150.0.camel@dhcp22.swansea.linux.org.uk>

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

>On Gwe, 2003-04-04 at 12:18, Chuck Ebbert wrote:
>> Erik Hensema wrote:
>> 
>> 
>> > A better fix in a running system is to simply disable dynamic module
>> > loading: echo /no/such/file > /proc/sys/kernel/modprobe
>> 
>> 
>>  You mean like this?
>> 
>>    # echo 'x'>/proc/sys/kernel/modprobe
>>    bash: /proc/sys/kernel/modprobe: No such file or directory

>Thats not a sufficient fix except for people blindly running the
>example exploit

Speaking of the exploit fix: Since I run a kernel which has it
installed, I can no longer strace processes which do run as root but
have a gid sbit set, e.g.

# ls -la /tmp/bash 
-rwxr-sr-x    1 root     smmsp      541096 Apr  5 10:21 /tmp/bash
# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
# /tmp/bash
bash-2.05a# echo $$
2625

(in another shell)

# strace -f -p 2625
trace: ptrace(PTRACE_SYSCALL, ...): Operation not permitted
detach: ptrace(PTRACE_DETACH, ...): Operation not permitted

but the shell with the pid of 2625 is now "dead" until one sends it a 
SIGCONT:

# kill -CONT 2625

(other shell now works again)

% uname -an
Linux henning-pc 2.4.18-27.7.x #1 Fri Mar 14 06:44:53 EST 2003 i686 unknown

I'm running the most current strace (4.4.94) because of the STOP/CONT
problems before (RH bugzilla #64303, #75709) but this is new after
installing the exploit fix.

(I found this BTW trying to trace sendmail that's why I have that test
case with setgid to smmsp).

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

  reply	other threads:[~2003-04-05  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-04 11:18 How to fix the ptrace flaw without rebooting Chuck Ebbert
2003-04-04 11:15 ` Alan Cox
2003-04-05  8:35   ` Henning P. Schmiedehausen [this message]
2003-04-06  1:28   ` Paul Jakma

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='b6m4g8$rp1$1@tangens.hometree.net' \
    --to=hps@intermeta.de \
    --cc=linux-kernel@vger.kernel.org \
    /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®