Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1195729 - (CVE-2015-0283) CVE-2015-0283 slapi-nis: infinite loop in getgrnam_r() and getgrgid_r()
CVE-2015-0283 slapi-nis: infinite loop in getgrnam_r() and getgrgid_r()
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20150326,repor...
: Security
Depends On: 1202995 1202996 1206049
Blocks: 1195735
  Show dependency treegraph
 
Reported: 2015-02-24 08:26 EST by Martin Prpič
Modified: 2018-01-29 20:04 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
It was discovered that the slapi-nis Directory Server plug-in did not correctly perform memory reallocation when handling user account information. A request for information about a group with many members, or a request for a user that belongs to a large number of groups, would cause a Directory Server to enter an infinite loop and consume an excessive amount of CPU time.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch 1 makes use of libnss_sss.so.2 directly (13.65 KB, patch)
2015-02-24 13:02 EST, Alexander Bokovoy
no flags Details | Diff
patch 2 store the length of reallocated chunk (1.34 KB, patch)
2015-02-24 13:04 EST, Alexander Bokovoy
no flags Details | Diff
patch 3 make default nss buffer larger (1.39 KB, patch)
2015-02-25 05:23 EST, Alexander Bokovoy
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0728 normal SHIPPED_LIVE Moderate: ipa and slapi-nis security and bug fix update 2015-03-26 15:50:25 EDT

  None (edit)
Description Martin Prpič 2015-02-24 08:26:13 EST
It was discovered that the slapi-nis Directory Server plug-in did not correctly perform memory reallocation when handling user account information. A request for information about a group with many members, or a request for a user that belongs to a large number of groups, would cause a Directory Server to enter an infinite loop and consume an excessive amount of CPU time.

Acknowledgements:

This issue was discovered by Sumit Bose of Red Hat.
Comment 2 Alexander Bokovoy 2015-02-24 13:02:47 EST
Created attachment 994786 [details]
patch 1 makes use of libnss_sss.so.2 directly

First patch in a series to fix the issue. We have two separate problems that cause deadlock: one is resizing issue (coming in patch 2) and another is traversing of NSS stack for all requests for user/group names (patch 1). The latter is amplifying the issue with realloc() because nss_files.so.2 is always in the NSS stack and will always lock up access to /etc/group or /etc/passwd for other threads.
Comment 3 Alexander Bokovoy 2015-02-24 13:04:10 EST
Created attachment 994788 [details]
patch 2 store the length of reallocated chunk

Patch 2 makes sure we remember new size of the reallocated memory.
Comment 4 Alexander Bokovoy 2015-02-25 05:23:11 EST
Created attachment 995077 [details]
patch 3 make default nss buffer larger

Patch 3 makes sure the default buffer size is of reasonable size -- initial buffer size for getgrnam/getgrgid in glibc is about 1KiB while for typical AD environments group information may occupy a larger space. Use 16KiB by default.
Comment 5 Alexander Bokovoy 2015-02-25 05:23:49 EST
Comment on attachment 995077 [details]
patch 3 make default nss buffer larger

wrong MIME type
Comment 37 Francisco Alonso 2015-03-24 10:10:49 EDT
Splitting IPA memory corruption issue when using get_user_grouplist() to separate bug 1205200 with the CVE-2015-1827 assigned.
Comment 38 Tomas Hoger 2015-03-26 04:11:51 EDT
Created slapi-nis tracking bugs for this issue:

Affects: fedora-all [bug 1206049]
Comment 39 errata-xmlrpc 2015-03-26 11:50:33 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:0728 https://rhn.redhat.com/errata/RHSA-2015-0728.html
Comment 40 Fedora Update System 2015-03-31 17:55:03 EDT
freeipa-4.1.4-1.fc22, slapi-nis-0.54.2-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 41 Fedora Update System 2015-04-06 04:32:32 EDT
freeipa-4.1.4-1.fc21, slapi-nis-0.54.2-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.