Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 324017 (CVE-2010-0826) - <sys-libs/nss-db-2.2.3_pre1-r4 : Symlink vulnerability (CVE-2010-0826)
Summary: <sys-libs/nss-db-2.2.3_pre1-r4 : Symlink vulnerability (CVE-2010-0826)
Status: RESOLVED FIXED
Alias: CVE-2010-0826
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://bugs.launchpad.net/ubuntu/+so...
Whiteboard: B3 [noglsa]
Keywords:
Depends on: 486928
Blocks:
  Show dependency tree
 
Reported: 2010-06-14 20:58 UTC by Matthias Geerdsen (RETIRED)
Modified: 2016-03-02 09:50 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Geerdsen (RETIRED) gentoo-dev 2010-06-14 20:58:59 UTC
CVE-2010-0826 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2010-0826):
  The Free Software Foundation (FSF) Berkeley DB NSS module (aka
  libnss-db) 2.2.3pre1 reads the DB_CONFIG file in the current working
  directory, which allows local users to obtain sensitive information
  via a symlink attack involving a setgid or setuid application that
  uses this module.
Comment 1 Chris Reffett (RETIRED) gentoo-dev Security 2013-07-08 21:09:05 UTC
Patch available at https://bugzilla.redhat.com/attachment.cgi?id=405473
Comment 2 Chris Reffett (RETIRED) gentoo-dev Security 2013-09-03 22:29:35 UTC
Maintainer timeout. Security bump. Arches, please test and stable:
=sys-libs/nss-db-2.2.3_pre1-r4
Target arches: amd64 ppc x86. Thanks!
Comment 3 Chris Reffett (RETIRED) gentoo-dev Security 2013-09-04 16:01:54 UTC
Change of plans. @base-system: since nss-db blocks on >=glibc-2.15, and since 2.15 is stable, and 2.15 and onwards have incorporated this functionality, how do you all feel about treecleaning? Will lastrite in 30 days if no response given.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-10-10 01:55:13 UTC
<hat type="base-system">
1. I don't see the nss-db file db-Makefile in my local glibc, and we also need to bring in the custom gentoo bits: remake-all-db, sandbox.d_50nss-db

2. Can somebody please test that glibc nss-db works properly?

3. Is glibc-2.15 still hardmasked on hppa? That's the only blocker I'd consider for tree-cleaning it.

4. Glibc is missing one of the dependencies for nss-db: >=sys-libs/db-4, please add it. Or is the glibc variant using a different backend? If it's using a different backend, there WILL be breakage for users if they try to change from nss-db to glibc, and the nss-db code can't read the db files.
</hat>
Comment 5 SpanKY gentoo-dev 2013-12-23 07:25:01 UTC
(In reply to Robin Johnson from comment #4)

hppa issues with newer glibc versions have been resolved
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-12-23 08:44:58 UTC
creffett: points 1,2,4 of my comment #4 aren't resolved yet; you haven't responded to me for 2 months since asking your questions.

point 4 is the most critical one. The glibc version seems to use a custom DB format, while the older sys-libs/nss-db uses BerkDB explicitly. We need to force users to REMOVE their old .db files before upgrading, then run the remake-all-db script afterwards the upgrade. Possibly any app with open linkages to libnss_db might also need to be restarted?

vapier:
per my comment #4, point 1:
1. Can glibc please get $PORTDIR/sys-libs/nss-db/files/files/sandbox.d_50nss-db (also needs tweaking to include gshadow.db)
2. Can we install the remake-all-db script? (makefile has moved to /var/db/Makefile per glibc)
Comment 7 Chris Reffett (RETIRED) gentoo-dev Security 2013-12-23 13:48:18 UTC
I haven't responded because I don't know the answers. I only jumped in here with the suggestion to remove because it appeared at first glance that glibc-2.15 had a drop-in replacement. If you would rather stable the version I added the upstream patch to, then we can do that too.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-12-24 03:34:02 UTC
(In reply to Chris Reffett from comment #7)
> I haven't responded because I don't know the answers. I only jumped in here
> with the suggestion to remove because it appeared at first glance that
> glibc-2.15 had a drop-in replacement. If you would rather stable the version
> I added the upstream patch to, then we can do that too.
creffet, vapier:
Ok, I went and tested the glibc nss-db, and it's broken. Hangs infinitely in getservbyname lookups; anybody that uses those lookups will have a hung system.
Most notably ssh does one of these lookups by default unless you have an explicit Port set in your configuration or commandline.

Test program:
======
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv) {
	int i; struct servent *sp;

	printf("%s:%d:Calling getservbyname\n",__FILE__,__LINE__);
	sp = getservbyname("ssh", "tcp");
	printf("%s:%d:Done getservbyname\n",__FILE__,__LINE__);

	if(sp == NULL) {
		printf("No service found\n");
		exit(1);
	}
	printf("s_name: %s\n", sp->s_name);
}
======

nsswitch.conf:
services:    db files

This only occurs when the .db file exists (I created them freshly using the glibc Makefile to generate them).
Comment 9 SpanKY gentoo-dev 2013-12-24 11:12:30 UTC
(In reply to Robin Johnson from comment #6)

re-sandbox.d file: why do we need that at all ?  files shouldn't be opened for writing arbitrarily.

re-remake-all-db script: i don't see the point of this thing, and no other distro installs it.

re-hanging: sounds like bug 432020.
Comment 10 Pacho Ramos gentoo-dev 2015-07-14 12:33:59 UTC
Looks like bug 486928 was handled use.masking the USE flag and, then, this could be finally be treecleaned
Comment 11 Aaron Bauman (RETIRED) gentoo-dev 2016-02-20 06:12:37 UTC
vulnerable packages still in tree
Comment 12 Pacho Ramos gentoo-dev 2016-02-20 17:18:33 UTC
removed
Comment 13 Aaron Bauman (RETIRED) gentoo-dev 2016-02-21 04:01:39 UTC
Package removed per previous comments.  GLSA needed?
Comment 14 Aaron Bauman (RETIRED) gentoo-dev 2016-03-02 09:49:22 UTC
package has been tree cleaned.  No GLSA required