From: Daryl Tester <dt-lkml@handcraftedcomputers.com.au>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Sven Wegener <sven.wegener@stealer.net>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: PROBLEM?: "permission denied" when accessing /proc/self/fd/* after setuid
Date: Fri, 08 Aug 2008 11:54:48 +0930 [thread overview]
Message-ID: <489BAE70.5080909@handcraftedcomputers.com.au> (raw)
In-Reply-To: <20080808005049.GA20707@martell.zuzino.mipt.ru>
Alexey Dobriyan wrote:
> Something similar was fixed in 2.6.22, but let me check.
You're right - from <http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.22>:
commit 8948e11f450e6189a79e47d6051c3d5a0b98e3f3
Author: Alexey Dobriyan <adobriyan@openvz.org>
Date: Tue May 8 00:23:35 2007 -0700
Allow access to /proc/$PID/fd after setuid()
/proc/$PID/fd has r-x------ permissions, so if process does setuid(), it
will not be able to access /proc/*/fd/. This breaks fstatat() emulation
in glibc.
open("foo", O_RDONLY|O_DIRECTORY) = 4
setuid32(65534) = 0
stat64("/proc/self/fd/4/bar", 0xbfafb298) = -1 EACCES (Permission denied)
However, one of the kernels I tried this on (and failed) was a 2.6.24-19 -
is it possible this patch was backed out?
Cheers,
--dt
next prev parent reply other threads:[~2008-08-08 2:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-07 6:16 Daryl Tester
2008-08-07 15:20 ` Sven Wegener
2008-08-08 0:38 ` Daryl Tester
2008-08-08 0:50 ` Alexey Dobriyan
2008-08-08 2:24 ` Daryl Tester [this message]
2008-08-08 2:59 ` Daryl Tester
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=489BAE70.5080909@handcraftedcomputers.com.au \
--to=dt-lkml@handcraftedcomputers.com.au \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sven.wegener@stealer.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
all inboxes | Powered by JetHome®