Bug 10984 - restrict unprivileged mode operation to "stapusr" or similar
Summary: restrict unprivileged mode operation to "stapusr" or similar
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Dave Brolley
URL:
Keywords:
Depends on:
Blocks: blockers-1.1
  Show dependency treegraph
 
Reported: 2009-11-19 05:10 UTC by Frank Ch. Eigler
Modified: 2009-11-28 18:44 UTC (History)
0 users

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 Frank Ch. Eigler 2009-11-19 05:10:07 UTC
Considering the potential size of the worm can, for an early
non-experimental deployment of unprivileged mode, let's allow
sysadmins to restrict staprun to run even signed code only for
some users.

If we don't wish to build an elaborate ACL setup (or even a
simple one like /etc/ftpusers), how about restricting
signed mode to only "stapusr" people.  That way, two separate
actions are required by a local sysadmin: the approval of the
compilation environment, and approval of individual users.

Reuse of "staprun" as the groupid is probably plausible since
it's already a "lower privilege" sort of systemtap user, which
can only run precompiled stuff specifically installed under
/lib/modules/`uname -r`/systemtap.  The proposal here is to
also permit such people to run --unprivileged scripts / signed
modules.

(Another option is to create a third user group, like "stapunpriv",
but I can't think of a good case for it as distinct from stapusr.)
Comment 1 Dave Brolley 2009-11-24 19:56:03 UTC
commit 7067e1b0418eed528fe2d102654dbe12bb9236af

Minor rework as suggested on IRC pending.
Comment 2 Dave Brolley 2009-11-27 19:21:47 UTC
commit 1d4a927582c68e4278a1e44619e0cc310a83addf

Fix TOCTOU race between check access permissions of /lin/modules/KVER/systemtap
and canonicalizing its path.

Improve error messages.
Comment 3 Frank Ch. Eigler 2009-11-28 18:44:26 UTC
committed