Bug 937533 (CVE-2015-3246) - VUL-0: CVE-2015-3246: libuser: local root exploit through passwd file handling
Summary: VUL-0: CVE-2015-3246: libuser: local root exploit through passwd file handling
Status: RESOLVED FIXED
Alias: CVE-2015-3246
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other openSUSE 13.2
: P3 - Medium : Major
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/118511/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-09 12:40 UTC by Andreas Stieger
Modified: 2017-05-26 19:10 UTC (History)
3 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 Andreas Stieger 2015-07-09 12:40:16 UTC
Created attachment 640496 [details]
full advisory text

EMBARGOED, via distros

> Attached is an advisory about vulnerabilities we discovered in
> userhelper and libuser; we contacted Red Hat beforehand, and they have
> assigned the CVEs and prepared the patches already, and will send them
> here shortly.
> 
> As per Red Hat's request, the Coordinated Release Date for these issues
> should be fixed after 21st July 2015; feel free to choose the exact
> date, sometime around 17:00 UTC.
> 
> We are planning to publish an exploit with our advisory; if you need the
> exploit in advance for tests or QA, it can probably be arranged.
> 
> Thank you for your attention to this matter; we are at your disposal
> should you have any questions or comments: please encrypt any further
> correspondence with our PGP public key (attached).
> 
> With best regards,

The libuser issue:

> (CVE-2015-3246 libuser passwd file handling)
> 
> We discovered a bug in libuser itself: even though traditional programs
> like passwd, chfn, and chsh work on a temporary copy of /etc/passwd and
> eventually rename() it, libuser modifies /etc/passwd directly.
> Unfortunately, if anything goes wrong during these modifications,
> libuser may leave /etc/passwd in an inconsistent state.
> 
> This bug is not just another local denial-of-service: we were able to
> turn it into a local root exploit against userhelper and chfn (if linked
> with libuser).
> 
> There is also another, secondary aspect of this bug: glibc modules like
> nss and nscd do not expect /etc/passwd to be directly modified while
> they parse its contents, and programs from packages like shadow-utils
> and util-linux use lckpwdf() locks that are incompatible with libuser's
> fcntl() locks.

Full advisory text with mode details attached.
Patches to follow. CRD will be July 21, 22, or 23.
Comment 2 Andreas Stieger 2015-07-09 13:24:30 UTC
CRD: 2015-07-22 17:00 UTC
Comment 3 Swamp Workflow Management 2015-07-09 22:00:43 UTC
bugbot adjusting priority
Comment 4 Johannes Segitz 2015-07-10 11:07:49 UTC
New
CRD: 2015-07-23 17:00 UTC
Comment 6 Klaus Kämpf 2015-07-14 06:44:14 UTC
Argh, the patch is against HEAD, not the latest release (0.61) :-/
Comment 7 Andreas Stieger 2015-07-16 11:18:57 UTC
(In reply to Klaus Kämpf from comment #6)
> Argh, the patch is against HEAD, not the latest release (0.61) :-/

Requesting update. Can you backport the patch please?
Comment 10 Johannes Segitz 2015-07-24 07:19:50 UTC
public. Please submit for openSUSE
Comment 11 Andreas Stieger 2015-07-24 07:56:14 UTC
Since I unnecessarily requested the SLE submission, I copied it into openSUSE. Please review:
https://build.opensuse.org/request/show/318362
https://build.opensuse.org/request/show/318364
Comment 12 Klaus Kämpf 2015-07-24 08:10:06 UTC
submitted to security:SELinux (for Factory)
Comment 13 Andreas Stieger 2015-07-24 08:27:12 UTC
Could you please review SR#318364 for an update for 13.2?
Comment 14 Klaus Kämpf 2015-07-27 13:46:51 UTC
OBS sr was accepted
Comment 15 Andreas Stieger 2015-07-27 14:15:08 UTC
thanks, update is running
Comment 16 Swamp Workflow Management 2015-08-03 08:08:44 UTC
openSUSE-SU-2015:1332-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 937533
CVE References: CVE-2015-3246
Sources used:
openSUSE 13.2 (src):    libuser-0.60-3.3.1
Comment 18 Andreas Stieger 2017-05-26 19:10:25 UTC
done, closing