From: Gianni Mariani <gianni@mariani.ws>
To: Kris Warkentin <kewarken@qnx.com>
Cc: gdb@sources.redhat.com
Subject: Re: gdb and suid binaries - security?
Date: Wed, 03 Apr 2002 07:32:00 -0000 [thread overview]
Message-ID: <3CAB208A.5060805@mariani.ws> (raw)
In-Reply-To: <097201c1db23$feef79d0$b6010c0a@catdog>
To attach to a process, the kernel requires you have appropriate
permissions.
Starting program: /bin/su
/bin/su: Operation not permitted.
This is the same with strace:
strace `which su`
execve("/bin/su", ["/bin/su"], [/* 60 vars */]) = 0
strace: exec: Operation not permitted
It's basically a hole that's been closed by the OS.
Kris Warkentin wrote:
>Is it true that if gdb is debugging a suid binary then any calls they make
>from the debugger are executed as that user? Couldn't one then execute
>arbitrary instructions as root if you debugged something like su? Or even
>worse, just call setuid(0) and let the program run to completion.
>
>Oddly enough I've noticed that this actually fails on both FreeBSD and Linux
>but it almost seems to be some mechanism outside of gdb. Does anyone know
>how this works?
>
>cheers,
>
>Kris
>
next prev parent reply other threads:[~2002-04-03 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-03 7:26 Kris Warkentin
2002-04-03 7:32 ` Gianni Mariani [this message]
2002-04-03 7:52 Michael Elizabeth Chastain
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=3CAB208A.5060805@mariani.ws \
--to=gianni@mariani.ws \
--cc=gdb@sources.redhat.com \
--cc=kewarken@qnx.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