Bug 10033 - Specify a separate UID/GID for stapio execution
Summary: Specify a separate UID/GID for stapio execution
Status: RESOLVED WONTFIX
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-03 23:03 UTC by Josh Stone
Modified: 2011-05-14 14:27 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Stone 2009-04-03 23:03:25 UTC
Currently with staprun's setuid invocation, it will drop back to the real
UID/GID that invoked it before running stapio.  However, for some administrative
uses, it may be useful for the data collection to run under some other UID/GID
(which may not even have permission to run staprun).

Commit b516e13a allows this to some extent, so that a sudo staprun can still
drop permissions before running stapio.  We could carefully extend this
privilege to setuid invocations as well, perhaps allowed by a new stap group
(stapadm?).

NB: Such a granted privilege would effectively be the same as a password-free,
unrestricted sudo, given stapio's -c option and the runtime's system() call. 
That may be no worse than what stapdev lets one do with arbitrary kernel
modules, but this new privilege would be even easier to exploit.

See also:
http://sources.redhat.com/ml/systemtap/2009-q2/msg00065.html
http://sources.redhat.com/ml/systemtap/2009-q2/msg00104.html
Comment 1 Frank Ch. Eigler 2009-04-04 12:06:16 UTC
I would hesitate to open up one more iota of attack surface
just to make run-stap.sh more cozy to operate.
Comment 2 Josh Stone 2009-04-04 19:42:25 UTC
(In reply to comment #1)
> I would hesitate to open up one more iota of attack surface
> just to make run-stap.sh more cozy to operate.

Actually, run-stap is happy the way it is.  This is a more general feature that
"real" stap users might want, which Roland suggested while we were fixing up
run-stap.
Comment 3 Frank Ch. Eigler 2011-05-14 14:27:50 UTC
no recent/moving use case offered