Initial draft of privilege escalation policy

James Laska jlaska at redhat.com
Wed Jan 20 17:15:32 UTC 2010


Thanks for moving forward on this Adam!

On Wed, 2010-01-20 at 09:09 -0500, Matthias Clasen wrote:
> On Tue, 2010-01-19 at 19:15 -0800, Adam Williamson wrote:
> > Hi, everyone. As you may know if you've followed the meetings, FESCo has
> > cheerfully punted the privilege escalation policy issue back to us; they
> > want us to come up with a draft policy to take back to a FESCo meeting.
> > 
> > I have come up with a very initial draft of one now, with considerable
> > debt to Spot's blog post - http://spot.livejournal.com/312216.html . It
> > basically *is* the list from spot's post, slightly rewritten and with a
> > bit of preamble.
> > 
> > Things to consider: overall, does this layout seem sane? We want to keep
> > it reasonably simple and manageable for now. I realize that we really
> > ought to cover lots of over things. I also realize that this policy is
> > really the wrong way around; it should say what is allowed, not what's
> > not allowed. But that's way way harder and would be extremely difficult
> > to do in a reasonable timeframe. A policy that defines some of the
> > clearly known no-nos for us to check on is a significant but manageable
> > step.
> > 
> > Are there any other things that should be added to the list?
> > 
> > Other sections: I considered having a 'suggested compliance' section,
> > which would explain the preferred way of implementing authorization
> > (PolicyKit), and an 'enforcement' section, which would outline that QA
> > will test for compliance with the policy. But I'm not sure if they'd be
> > appropriate. What does everyone think?

re: enforcement ... not a bad idea.  We can certainly work those
backlinks in once we have some test documentation available.

> > --------------
> > 
> > Privilege Escalation Policy (draft)
> > 
> > == Scope ==
> > 
> > This policy aims to provide a consistent policy for how Fedora packages
> > should handle privilege escalation. At present it defines certain
> > privileged operations which must require root authentication to be
> > performed, or caused to be performed, interactively.
> > 
> > == Impact ==
> > 
> > This policy applies to any code which can allow a user to perform
> > privileged operations interactively. If the code in a package runs
> > entirely with privileges equal to or lower than a standard user account,
> > or has no facility for user interaction, this policy is unlikely to
> > apply to it. In practice, packages which provide one or more of:
> > 
> > * setuid binaries
> > * PolicyKit policies
> > * consolehelper configurations
> > 
> > are likely to be affected by this policy, and their maintainers should
> > ensure that they comply with it.
> > 
> > == Requirements ==
> > 
> > The policy requires that any code which allows a user to perform, or
> > cause to be performed, certain actions must require authentication as
> > the root user prior to the action being carried out. The actions are:
> 
> This does not seem right. While we want a standard, unprivileged user to
> not be able to do these things, we very much want to define an
> 'Administrator' role that can be assigned to users other than root and
> that will enable them to do many of these things by just authenticating
> as themselves, not as root. 

How does this work now?  I'm familiar with prompting for the users
password (not root) even if that user is in a special Administrator
group.

> The policy should be worded in a way that makes it clear that this is
> allowed.
> 
> > * Add, remove, upgrade or downgrade any system-wide application or
> > shared resource (packaged or otherwise)
> 
> I don't see how a Fedora policy can apply to non-packaged resources;
> other than the fact that those resources will be subject to normal
> access control (e.g. file permissions).

re: non-packaged resources, does this apply to things you setup on the
system after install (printers, package repositories, downloaded package
metadata)?

> > * Read or write directly to or from system memory (with the exception
> > that the 'cause to be performed' provision is waived in this case)
> 
> This seems entirely too vague to make sense. What does 'system memory'
> mean here ?
> 
> > * Load or unload kernel modules (with the exception of automatic loading
> > of appropriate modules for hotplugged hardware, managed via the
> > module-init-tools system)
> > * Start or stop system daemons
> 
> With the exception of daemons that are autostarted D-Bus system bus
> services...
> 
> > * Edit system-wide configuration files
> 
> Seems clear enough on the face of it, but is /etc/passwd a system-wide
> configuration file ? Users do edit that by changing e.g. their password.

Perhaps this applies to the comment above.  There is authentication
going one when changing the password, it prompts you for the password of
the current user.

> > * Access other users home directories (unless explicitly granted
> > permission by another user)
> > * Change any configuration of any other user's account, or view any
> > other user's password (with the provision that authentication as the
> > user in question, rather than root, would suffice in this case)
> 
> Again, I'd like this to be worded in a way that does not interfere with
> us introducing e.g. parental controls for supervised accounts.
> 
> > * Add or remove user accounts
> > * Change the system clock
> > * Shutdown or reboot the system (unless they are the only user logged
> > in, and they are logged in locally)
> > * Read from system logs containing any information about user activities
> > * Write to system logs (with the exception that the 'cause to be
> > performed' provision is waived in this case)
> 
> Huh ? The mere fact of me logging in will cause system logs to be
> written...

The exception noted above about 'cause to be performed' seems to capture
system log writes (/var/log/{secure,messages,Xorg}).  What do you define
as system logs?

> > * Write a file anywhere other than their home directory, /tmp, /var/tmp
> > or /usr/tmp (with the exceptions that the 'cause to be performed'
> > provision is waived in this case, and authentication as another user is
> > sufficient for writing to that user's home directory)
> > * Load or modify PolicyKit or SELinux policies
> > * Change SELinux enforcement levels
> > * Change or disable firewall settings
> > * Run an application that listens on a network port lower than 1024
> > * Mount or unmount anything (excluding automounted hotplugged storage
> > devices, and devices explicitly configured by the root user for
> > unprivileged use)
> 
> Another explicit mention of root that would better be replaced by 'a
> privileged user'.
> 
> > The term 'system-wide' means that the resource in question would be used
> > by any other user or system process.
> 
> 
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.fedoraproject.org/pipermail/test/attachments/20100120/f5c39ab7/attachment.bin 


More information about the test mailing list