Bug 744251 - AUDIT-0: spice-gtk setuid binary
Summary: AUDIT-0: spice-gtk setuid binary
Status: RESOLVED FIXED
: 995795 1016292 1055977 1063165 1072029 1077351 (view as bug list)
Alias: None
Product: SUSE Security Incidents
Classification: Novell Products
Component: Audits (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: unspecified
Assignee: Security Team bot
QA Contact: Security Team bot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-31 10:24 UTC by Dominique Leuenberger
Modified: 2019-02-14 17:21 UTC (History)
19 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Leuenberger 2012-01-31 10:24:16 UTC
spice-gtk, which is a dependency to gnome-boxes, installs polkit files and one suid bit helper.

Currently the package resides in home:dimstar:gnome-boxes/spice-gtk and is submitted to Virtualization/spice-gtk (SR#102156).

Please review and add exception so the rpmlintrc file can be dropped again.
Comment 1 Ludwig Nussel 2012-01-31 10:42:32 UTC
what's the purpose of the setuid binary?
please package without setuid bit until audited.

What polkit privileges are used and for what purpose?
Comment 2 Dominique Leuenberger 2012-01-31 14:05:20 UTC
The binary getting suid is called
  spice-client-glib-usb-acl-helper, apparently a bridge between glib and polkit.



The polkit 'warning' is
spice-gtk.x86_64: I: polkit-untracked-privilege org.spice-space.lowlevelusbaccess (??:no:auth_admin_keep)
The privilege is not listed in /etc/polkit-default-privs.* which makes it
harder for admins to find. If the package is intended for inclusion in any
SUSE product please open a bug report to request review of the package by the
security team

spice-gtk.x86_64: I: polkit-cant-acquire-privilege org.spice-space.lowlevelusbaccess (??:no:auth_admin_keep)
Usability can be improved by allowing users to acquire privileges via
authentication. Use e.g. 'auth_admin' instead of 'no' and make sure to define
'allow_any'. This is an issue only if the privilege is not listed in /etc
/polkit-default-privs.*


==>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
	  "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
	  "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>

  <vendor>The Spice Project</vendor>
  <vendor_url>http://spice-space.org/</vendor_url>
  <icon_name>spice</icon_name>

  <action id="org.spice-space.lowlevelusbaccess">
    <description>Low level USB device access</description>
    <message>Privileges are required for low level USB device access (for usb device pass through).</message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>

</policyconfig>

====> Needed for the pass through of USB Devices to the virtual machines that are to be managed.
Comment 3 Ludwig Nussel 2012-01-31 14:11:17 UTC
let me guess... the setuid binary opens raw usb devices on behalf of the user, using polkit for authorization?
Used to be the job of resmgr. A setuid binary for that isn't nice.
Comment 6 Bernhard Wiedemann 2013-06-30 21:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (744251) was mentioned in
https://build.opensuse.org/request/show/181541 Factory / spice-gtk
Comment 10 Cédric Bosdonnat 2016-08-30 14:32:12 UTC
*** Bug 995795 has been marked as a duplicate of this bug. ***
Comment 14 Jiri Slaby 2017-07-14 07:59:30 UTC
Ping?

Is everyone supposed to add the suid bit every time the package is updated?
Comment 15 Andreas Stieger 2017-07-14 11:16:54 UTC
(In reply to Jiri Slaby from comment #14)
> Is everyone supposed to add the suid bit every time the package is updated?

Security team has not approved a setuid root for this binary.
Comment 16 Jiri Slaby 2017-07-14 11:30:53 UTC
(In reply to Andreas Stieger from comment #15)
> (In reply to Jiri Slaby from comment #14)
> > Is everyone supposed to add the suid bit every time the package is updated?
> 
> Security team has not approved a setuid root for this binary.

Yes, indeed, so because somebody has not approved that, is everyone supposed to add the suid bit every time the package is updated?
Comment 17 Andreas Stieger 2017-07-14 11:51:46 UTC
I think you are reversing causality here. The setuid bit is not approved because we consider the implementation insecure. In the absence of a secure implementation, the functionality should not be used. Please let us know if you have substantial changes to look at.
Comment 18 Tomáš Chvátal 2017-08-10 20:14:13 UTC
@security-team: moving to tumbleweed. Still feel free to close if it does not pass the audit.
Comment 19 Cédric Bosdonnat 2017-08-29 09:57:01 UTC
*** Bug 1055977 has been marked as a duplicate of this bug. ***
Comment 20 Sebastian Krahmer 2017-09-20 13:49:51 UTC
accidently re-opened without comment?
Comment 21 Cédric Bosdonnat 2017-10-17 08:09:28 UTC
*** Bug 1063165 has been marked as a duplicate of this bug. ***
Comment 22 Cédric Bosdonnat 2017-10-17 08:09:31 UTC
*** Bug 1016292 has been marked as a duplicate of this bug. ***
Comment 23 Cédric Bosdonnat 2017-12-11 08:13:09 UTC
*** Bug 1072029 has been marked as a duplicate of this bug. ***
Comment 24 Liang Yan 2018-03-30 17:30:15 UTC
*** Bug 1077351 has been marked as a duplicate of this bug. ***
Comment 25 simon becherer 2018-06-30 08:49:45 UTC
I understand the security problems by set s bit.

but 6 years with a lot of people have this problem
why not go another way if this bit will not be set
because of security?

could we not generate a new group for this file.
"usb-spice-redirection"
so people who need this could add this to user who
need this functionality. other users would still not
have access.

this would be a compromise for security AND gave the 
high advantage not every update (tumbleweed) set by
hand the accessrights.

why is this bug marked as resolved fixed?
i reopen it, because for me this problem still exists.
Comment 26 Andreas Stieger 2018-06-30 09:36:36 UTC
(In reply to simon becherer from comment #25)
> could we not generate a new group for this file.
> "usb-spice-redirection"
> so people who need this could add this to user who
> need this functionality. other users would still not
> have access.

That is a usual work-around. Please present a package proposal that does that.

> this would be a compromise for security AND gave the 
> high advantage not every update (tumbleweed) set by
> hand the accessrights.

Are you are not aware of /etc/permissions.local?

> why is this bug marked as resolved fixed?

Because the request was to have it setuid root, which was not approved. The audit is completed, so it's a WONTFIX really.

> i reopen it, because for me this problem still exists.

It is a bug tracker to organize the developer work, not a helpdesk ticket tracker. The only new information presented is the proposal for a separate group, no new code shown for an audit.
Comment 27 Matthias Gerstner 2018-07-02 08:16:38 UTC
Hey Simon,

> could we not generate a new group for this file.
> "usb-spice-redirection"
> so people who need this could add this to user who
> need this functionality. other users would still not
> have access.

a somewhat shorter group name would probably be better. We do have the
"trusted" group predefined that allows execution of things like crontab setuid
root. This one could be reused. But a new one is also fine.

> this would be a compromise for security AND gave the
> high advantage not every update (tumbleweed) set by
> hand the accessrights.

This specific bug here was for reviewing the spice-gtk package and deciding
whether we can add the setuid bit. It was decided that we don't want that in a
general form.

If you want to introduce the separate group then the first step would be to
open a separate bug for the spice-gtk package maintainers describing your
request. Alternatively you can invest time yourself and adjust the package
accordingly, submitting it to the spice-gtk devel project.

Once the new group is in place and working as desired you can reopen this
AUDIT bug, or create a new AUDIT bug for spice-gtk. Then we from security can
inspect it again and finally whitelist it.
Comment 28 Matthias Gerstner 2018-07-17 07:59:21 UTC
I reviewed this setuid helper in a follow-up review in bug 1083025. It is
basically okay, but a bit strange in its design. We can whitelist it as soon
as there is a separate group setup for it. I am therefore closing this AUDIT
bug and will split off a separate bug for tracking the group issue.
Comment 29 Andreas Stieger 2018-07-17 09:43:19 UTC
that split bug is bug 1101420.