First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 154313
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Security <security@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Sune Kloppenborg Jeppesen <jaervosz@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:
Flags: Requestee:
 
 
  ()

Filename Description Type Creator Created Size Actions
back.c.patch Patch in Git patch Harlan Lieberman-Berg (RETIRED) 2006-12-21 18:25 0000 6.97 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 154313 depends on: Show dependency tree
Show dependency graph
Bug 154313 blocks:

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-11-06 22:56 0000
Not sure wether we're affected by this one:

Since 2.2 we have been doing a chroot check to see if it is appropriate to
 return a read or follow one of these magic symlinks.  The chroot check was
 asking a question about the visibility of files to the calling process and
 it was actually checking the destination process, and not the files
 themselves.  That test was clearly bogus.

 In my first pass through I simply fixed the test to check the visibility of
 the files themselves.  That naive approach to fixing the permissions was
 too strict and resulted in cases where a task could not even see all of
 it's file descriptors.

 What has disturbed me about relaxing this check is that file descriptors
 are per-process private things, and they are occasionaly used a user space
 capability tokens.  Looking a little farther into the symlink path on /proc
 I did find userid checks and a check for capability (CAP_DAC_OVERRIDE) so
 there were permissions checking this.

 But I was still concerned about privacy.  Besides /proc there is only one
 other way to find out this kind of information, and that is ptrace.  ptrace
 has been around for a long time and it has a well established security
 model.

 So after thinking about it I finally realized that the permission checks
 that make sense are the permission checks applied to ptrace_attach.  The
 checks are simple per process, and won't cause nasty surprises for people
 coming from less capable unices.

 Unfortunately there is one case that the current ptrace_attach test does
 not cover: Zombies and kernel threads.  Single stepping those kinds of
 processes is impossible.  Being able to see which file descriptors are open
 on these tasks is important to lsof, fuser and friends.  So for these
 special processes I made the rule you can't find out unless you have
 CAP_SYS_PTRACE.

 These proc permission checks should now conform to the principle of least
 surprise.  As well as using much less code to implement :)

 Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
 Signed-off-by: Andrew Morton <akpm@osdl.org>
 Signed-off-by: Linus Torvalds <torvalds@osdl.org>

------- Comment #1 From Harlan Lieberman-Berg (RETIRED) 2006-12-21 18:25:56 0000 -------
Created an attachment (id=104552) [edit]
Patch in Git

------- Comment #2 From Harlan Lieberman-Berg (RETIRED) 2006-12-21 18:28:01 0000 -------
hppa-sources: Bump to 2.6.19 or patch.
mips-sources: Bump to 2.6.19 or patch.
rsbac-sources: Bump to 2.6.19 or patch.
systrace-sources: Bump to 2.6.19 or patch.
usermode-sources: Bump to 2.6.19 or patch.
xen-sources: Bump to 2.6.19 or patch.

------- Comment #3 From Guy Martin 2006-12-23 03:51:27 0000 -------
hppa-sources-2.6.19.1 commited.

------- Comment #4 From Daniel Gryniewicz 2007-01-02 20:00:57 0000 -------
usermode-sources-2.6.18-r1 added.

------- Comment #5 From Guillaume Destuynder (RETIRED) 2007-01-12 13:40:28 0000 -------
rsbac-sources-2.6.19 is in cvs (~arch)

------- Comment #6 From Harlan Lieberman-Berg (RETIRED) 2007-05-21 23:18:43 0000 -------
Waiting on Xen.

------- Comment #7 From Micheal Marineau 2007-08-26 23:28:30 0000 -------
The patch listed here was actually included in 2.6.18, not 2.6.19. So
>=xen-sources-2.6.18 is unaffected. I masked xen-sources-2.6.16 a couple days
ago and will be removed soon.

First Last Prev Next    No search results available      Search page      Enter new bug