[lkml]   [2008]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: PROBLEM?: "permission denied" when accessing /proc/self/fd/* after setuid
Alexey Dobriyan wrote:

> Something similar was fixed in 2.6.22, but let me check.

You're right - from <>:

commit 8948e11f450e6189a79e47d6051c3d5a0b98e3f3
Author: Alexey Dobriyan <>
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?


 \ /
  Last update: 2008-08-08 04:27    [W:0.050 / U:15.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site