Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 372509 - ptrace_scope security restriction has no relief
Summary: ptrace_scope security restriction has no relief
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 20:06 UTC by Chris Bruner
Modified: 2011-06-29 19:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Bruner 2011-06-21 20:06:28 UTC
When trying to attach to a sleeping cgi program kernel linux-2.6.39-gentoo does not allow it. 
ptrace: Operation not permitted.
After much searching it appears that a patch to restrict debugging of other program owners is the problem http://lwn.net/Articles/393010/ 

ubuntu is able to enable this back again by 

echo 1 | sudo tee /proc/sys/kernel/yama/ptrace_scope

however in the gentoo kernel there is no such thing as yama

This is a major problem for me as I NEED to be able to trace cgi's.

Reproducible: Always

Steps to Reproduce:
1.launch a program under user 'A'
2. as user 'B' attempt to attach to program (get error)




/etc/sysctl.conf has ptrace_scope=0 and a note to turn on nfsd, 

Seems to do nothing.
Comment 1 SpanKY gentoo-dev 2011-06-29 19:02:07 UTC
we dont add arbitrary patches to the gentoo sources.  only fixes for important bugs get merged.

if you have a problem with a fix merged into mainline sources, then mainline is the place to complain.
Comment 2 Chris Bruner 2011-06-29 19:41:19 UTC
Ok, it's just that ubuntu has yama which can control this problem where gentoo does not. I know that ubuntu isn't upstream from gentoo but wondered if whatever their "important" patch was could be used for gentoo as well.  

My workaround it to debug using root which feels wrong.