Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Security of OpenSCAP daemon features #22

Open
mpreisler opened this issue Oct 21, 2015 · 6 comments
Open

Security of OpenSCAP daemon features #22

mpreisler opened this issue Oct 21, 2015 · 6 comments

Comments

@mpreisler
Copy link
Member

Some parts of the daemon are harmless and we don't have to require root permissions to access it -- for example the CVE scan. Some parts are more or less privilege escalation devices, users can get root rights by injecting content with bash remediations. These remediations can do anything root can do, including giving some particular users root rights. This is obviously something we have to avoid!

These are some ways to solve this:

  • The tasks can optionally drop rights before evaluating
    • technically this is very nice, users can evaluate using their own rights
    • unfortunately this is not very useful, most content requires root rights to be usable
  • We can split the interface, allow anyone within some group to do all the unprivileged safe stuff and only let root do the dangerous stuff
    • what do we allow in the unprivileged interface besides cve scanning?
  • We can require root for everything and then nothing is privilege escalation (this is what we do now)
  • Combination of the above

Thoughts? I'd like to discuss this a little before committing to any direction.

@ybznek @baude @isimluk

@mpreisler mpreisler added this to the 0.1.1 milestone Oct 21, 2015
@mpreisler
Copy link
Member Author

@ybznek
Copy link
Contributor

ybznek commented Oct 23, 2015

I don't have much experience with issues like that and I don't know how to technically do that...

IMHO the best choice is "optionally drop rights before evaluating " + "allow anyone within some group to do all the unprivileged safe stuff and only let root do the dangerous stuff"

So, root should be able don't use his rights. I think, there is a lot of content which don't require root rights.

@isimluk
Copy link
Member

isimluk commented Oct 23, 2015

In a first step, I would go for dropping privileges for CVE scan. Afterall it may execute content from the network.

@baude
Copy link
Contributor

baude commented Oct 26, 2015

The CVE scan of a containers/images does require root privs because it has to mount a thinpool device. So while the scan itself does not need to be technically run by root, there are steps to setup and tear down that would.

@mpreisler
Copy link
Member Author

There are 2 distinct problems we need to solve and I apologize for mixing them up in this thread.

  1. Who do we allow to interact with OpenSCAP Daemon via dbus and what do we allow them to do?
  • can just root create tasks and change tasks or do we allow that for more people?
  • special privileged group?
  1. Where do we drop privileges in OpenSCAP Daemon?
  • scanning local machine with content that doesn't require root -- this is IMHO very very rare and we don't even have to consider it
  • scanning remote machines via oscap-ssh is one obvious case
  • scanning virtual machines may be applicable but that depends on configuration
  • right now I don't see that many other opportunities to drop privileges

I would like to solve 1) first because it alters the public interface that I want to stabilize.

@isimluk
Copy link
Member

isimluk commented Nov 12, 2015

On the other hand solving the (2) first, may put some light on (1).

These are all hardish questions anyway. From user perspective, it would be great if the tool mimics the priviledges of the user (including libvirt, ssh-agent, selinux label (like staff_t)). This leads me to think that daemon may want to fork and change identity from root to the user, who scheduled that particular action (requestee). Is this technically possible, is daemon able to authenticate requestee over dbus?

What are your thoughts?

@mpreisler mpreisler modified the milestones: 0.1.2, 0.1.1 Nov 25, 2015
@mpreisler mpreisler modified the milestones: 0.1.3, 0.1.2 Jan 25, 2016
@jan-cerny jan-cerny modified the milestones: 0.1.4, 0.1.3 Feb 11, 2016
@mpreisler mpreisler modified the milestones: 0.1.4, 0.1.5 Mar 24, 2016
@mpreisler mpreisler modified the milestones: 0.1.5, 0.1.6 Apr 22, 2016
@mpreisler mpreisler modified the milestones: 0.1.6, 0.2.0 Aug 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants