public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] setuid/setgid binaries, man-db security fix
@ 2016-12-12 22:46 Ian Zimmerman
  2016-12-13  2:05 ` John Covici
  2016-12-13  7:20 ` Jeremi Piotrowski
  0 siblings, 2 replies; 5+ messages in thread
From: Ian Zimmerman @ 2016-12-12 22:46 UTC (permalink / raw
  To: gentoo-user

This morning I was pointed at [1] (by reading [2]).

As far as I can see there has been no bug report about this in gentoo.
Should I file one now?  It doesn't look like the fix can be easily
backported so probably it will just end up being merged with the rest of
the new version.  But it may be worthwhile to mark it as a security
issue.

More generally, I'm wondering about set*id binaries in gentoo.  If I
don't want/need the particular feature thus provided, can I simply turn
off the set*id bit?  That's what [3] recommends, but what about
upgrades?  When a new version of the package is emerged, will the set*id
bit be turned back on?  Will I have to remember turning it off forever?
dpkg has a feature (dpkg-statoverride) where a local admin can force
permissions on files shipped in packages, and such overrides "stick"
even across upgrades.  Is there anything similar for gentoo?

[1]
https://lists.nongnu.org/archive/html/man-db-announce/2016-12/msg00000.html

[2]
http://www.chiark.greenend.org.uk/~cjwatson/blog/cve-2015-1336.html

[3]
https://wiki.gentoo.org/wiki/Security_Handbook/File_permissions

-- 
Please *no* private Cc: on mailing lists and newsgroups
Personal signed mail: please _encrypt_ and sign
Don't clear-text sign: http://cr.yp.to/smtp/8bitmime.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] setuid/setgid binaries, man-db security fix
  2016-12-12 22:46 [gentoo-user] setuid/setgid binaries, man-db security fix Ian Zimmerman
@ 2016-12-13  2:05 ` John Covici
  2016-12-13  7:20 ` Jeremi Piotrowski
  1 sibling, 0 replies; 5+ messages in thread
From: John Covici @ 2016-12-13  2:05 UTC (permalink / raw
  To: gentoo-user

On Mon, 12 Dec 2016 17:46:31 -0500,
Ian Zimmerman wrote:
> 
> This morning I was pointed at [1] (by reading [2]).
> 
> As far as I can see there has been no bug report about this in gentoo.
> Should I file one now?  It doesn't look like the fix can be easily
> backported so probably it will just end up being merged with the rest of
> the new version.  But it may be worthwhile to mark it as a security
> issue.
> 
> More generally, I'm wondering about set*id binaries in gentoo.  If I
> don't want/need the particular feature thus provided, can I simply turn
> off the set*id bit?  That's what [3] recommends, but what about
> upgrades?  When a new version of the package is emerged, will the set*id
> bit be turned back on?  Will I have to remember turning it off forever?
> dpkg has a feature (dpkg-statoverride) where a local admin can force
> permissions on files shipped in packages, and such overrides "stick"
> even across upgrades.  Is there anything similar for gentoo?
> 
> [1]
> https://lists.nongnu.org/archive/html/man-db-announce/2016-12/msg00000.html
> 
> [2]
> http://www.chiark.greenend.org.uk/~cjwatson/blog/cve-2015-1336.html
> 
> [3]
> https://wiki.gentoo.org/wiki/Security_Handbook/File_permissions
> 

I suppose you could automatically run a shell script in the post
installation phase to fix the permissions.  I need to do the opposite
for one of the sendmail binaries.

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici@ccs.covici.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] setuid/setgid binaries, man-db security fix
  2016-12-12 22:46 [gentoo-user] setuid/setgid binaries, man-db security fix Ian Zimmerman
  2016-12-13  2:05 ` John Covici
@ 2016-12-13  7:20 ` Jeremi Piotrowski
  2016-12-13 23:29   ` [gentoo-user] " Ian Zimmerman
  1 sibling, 1 reply; 5+ messages in thread
From: Jeremi Piotrowski @ 2016-12-13  7:20 UTC (permalink / raw
  To: gentoo-user

On Mon, Dec 12, 2016 at 02:46:31PM -0800, Ian Zimmerman wrote:
> More generally, I'm wondering about set*id binaries in gentoo.  If I
> don't want/need the particular feature thus provided, can I simply turn
> off the set*id bit?  

Most of the time packages will not work correctly (as defined by upstream)
and will require you to run them as root explicitly (e.g. through sudo). 

But maybe the right solution for you is to mount your root partition
nosuid. You could see how that works out first before doing anything more
permanent - or maybe that will be enough.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gentoo-user] Re: setuid/setgid binaries, man-db security fix
  2016-12-13  7:20 ` Jeremi Piotrowski
@ 2016-12-13 23:29   ` Ian Zimmerman
  2016-12-14  4:26     ` Miroslav Rovis
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Zimmerman @ 2016-12-13 23:29 UTC (permalink / raw
  To: gentoo-user

On 2016-12-13 08:20, Jeremi Piotrowski wrote:

> > More generally, I'm wondering about set*id binaries in gentoo.  If I
> > don't want/need the particular feature thus provided, can I simply
> > turn off the set*id bit?
> 
> Most of the time packages will not work correctly (as defined by
> upstream) and will require you to run them as root explicitly
> (e.g. through sudo).

Returning to the special case of man-db package, both man and mandb seem
to run fine as normal non-suid binaries (after I also changed the perms
on /var/cache/man to the normal root:root, 644/755).

I reported the bug:

https://bugs.gentoo.org/show_bug.cgi?id=602588

-- 
Please *no* private Cc: on mailing lists and newsgroups
Personal signed mail: please _encrypt_ and sign
Don't clear-text sign: http://cr.yp.to/smtp/8bitmime.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] Re: setuid/setgid binaries, man-db security fix
  2016-12-13 23:29   ` [gentoo-user] " Ian Zimmerman
@ 2016-12-14  4:26     ` Miroslav Rovis
  0 siblings, 0 replies; 5+ messages in thread
From: Miroslav Rovis @ 2016-12-14  4:26 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

On 161213-15:29-0800, Ian Zimmerman wrote:
> On 2016-12-13 08:20, Jeremi Piotrowski wrote:
> 
> > > More generally, I'm wondering about set*id binaries in gentoo.  If I
> > > don't want/need the particular feature thus provided, can I simply
> > > turn off the set*id bit?
> > 
> > Most of the time packages will not work correctly (as defined by
> > upstream) and will require you to run them as root explicitly
> > (e.g. through sudo).
> 
> Returning to the special case of man-db package, both man and mandb seem
> to run fine as normal non-suid binaries (after I also changed the perms
> on /var/cache/man to the normal root:root, 644/755).
> 
> I reported the bug:
> 
> https://bugs.gentoo.org/show_bug.cgi?id=602588
> 

This whole issue (since the start of this thread)... Thanks for
reporting it! It's been, and continues to be (lots of ongoing suspense,
and, in segments only, even non-disclosure; both for longer yet) the
most interesting information that I've had recently.

(Also I'll update A.S.A.P.)

-- 
Miroslav Rovis
Zagreb, Croatia
http://www.CroatiaFidelis.hr

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-14  4:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-12 22:46 [gentoo-user] setuid/setgid binaries, man-db security fix Ian Zimmerman
2016-12-13  2:05 ` John Covici
2016-12-13  7:20 ` Jeremi Piotrowski
2016-12-13 23:29   ` [gentoo-user] " Ian Zimmerman
2016-12-14  4:26     ` Miroslav Rovis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox