sudo granularity
Posted Nov 21, 2009 2:36 UTC (Sat) by
drag (subscriber, #31333)
In reply to:
sudo granularity by michaeljt
Parent article:
Fedora 12 to remove unprivileged package installation
Isn't that enough?!
Look at the above example given:
foo ALL=NOPASSWD: aptitude update, aptitude upgrade
When you invoke 'aptitude upgrade' aptitude will sometimes run into
dependency resolution issues. When that happens you can go into 'resolution
mode' that gives you full access to the aptitude gui and there you can
perform any of the functions supported by aptitude, which is a huge amount.
That is almost certainly not the intended purpose of that sudoers line! How
hard would you suppose it would be to get a shell out of something like
that?
Is aptitude even intended to be secure against tempering? Did the author
ever intend or expect it to need to be tamper proof? I really doubt it.
You guys are going on like sudo is easy to get right that it's easy to
write administrative scripts and that it's configuration system is so much
more simpler and easier to deal with.. and it's not. It's a very difficult
thing to get right with a very obscure configuration system and is full of
numerous pitfalls and holes. The major benefit of sudo right now is that
it's going through so many years of providing so many security holes in so
many systems that people have most of the obvious stuff that can go wrong
with the sudo command itself fairly locked down.
Another example is what happens when you perform a upgrade and Debian
introduces a configuration change to one of the maintainer scripts? I know
you can view the differences between the files... does it use 'less' for
this? (I don't know off the top of my head) If it does then you can do a !
and shell out of that and then get full root access.
In that example it's obvious that the person was trying to take something
that was never intended and never designed to provide any sort of security
at all.. aptitude was designed for the sole purpose of being used by a root
account with no access controls expected at all and then your trying to to
use sudo to turn into something that it's not designed to do. I am not
trying to pick on it and I expect a person can come up with better examples
with more thought, so any apologies if I offended; I am not trying to be
insulting or anything here.
But, at least with packagekit and policykit I never have to worry
about
any of that affecting the security of my desktops if I configure it to
allow certain users to perform upgrades and nothing else. It's not really
that difficult to 'get' and work with it to provide that sort of common
functionality.
not hard to do at all.
(
Log in to post comments)