Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 951086 - sssd segfaults (sssd_be & sssd_pam) with use-after-free error if the back end request takes too long
sssd segfaults (sssd_be & sssd_pam) with use-after-free error if the back end...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd (Show other bugs)
6.4
x86_64 Linux
urgent Severity urgent
: rc
: ---
Assigned To: Jakub Hrozek
Kaushik Banerjee
: ZStream
: 972699 994526 (view as bug list)
Depends On: 923813
Blocks: 928849 960054 986824
  Show dependency treegraph
 
Reported: 2013-04-11 08:47 EDT by Dmitri Pal
Modified: 2013-11-21 17:16 EST (History)
16 users (show)

See Also:
Fixed In Version: sssd-1.9.2-92.el6
Doc Type: Bug Fix
Doc Text:
In case the processing of an LDAP request took longer than the client timeout (60 seconds by default), upon completing the request, the PAM client could have accessed memory that was previously freed due to the client timeout being reached. As a result, the sssd_pam process terminated unexpectedly with a segmentation fault. With this update, SSSD ignores an LDAP request result when it detects that the set timeout of this request has been reached. The sssd_pam process no longer crashes in the aforementioned scenario.
Story Points: ---
Clone Of: 923813
Environment:
Last Closed: 2013-11-21 17:16:47 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1680 normal SHIPPED_LIVE sssd bug fix and enhancement update 2013-11-20 16:52:37 EST

  None (edit)
Comment 1 Jakub Hrozek 2013-05-10 11:08:56 EDT
Fixed upstream.
Comment 6 Eugene Keck 2013-07-19 11:23:36 EDT
GSS Approved for Hot Fix

---------------------------------------------

* Customer impact (or Business case)

SSSD crashes ~20 crashes per day and impact 60 servers, with ~1000 distinct users logging in.
Comment 11 Amith 2013-09-03 17:20:31 EDT
Verified the BZ on SSSD version: sssd-1.9.2-123.el6.x86_64

Steps followed during verification:

1. Attach sssd_be process to gdb 

# gdb /usr/libexec/sssd/sssd_be 5267

2. Set the break point at krb5_auth_send

(gdb) break krb5_auth_send
Breakpoint 1 at 0x7ffcc88f3990
(gdb) cont
Continuing.

3. Execute user auth via kerberos server and monitor the backend processes in parallel.

# ps -e | grep sss
 5266 ?        00:00:00 sssd
 5267 ?        00:00:00 sssd_be
 5268 ?        00:00:00 sssd_nss
 5269 ?        00:00:00 sssd_pam
 
4. When user authentication pauses at break point, wait till client_idle_timeout expires and hit enter at gdb prompt

Breakpoint 1, 0x00007ffcc88f3990 in krb5_auth_send () from /usr/lib64/sssd/libsss_krb5.so
(gdb) 
Continuing.

Program received signal SIGTERM, Terminated.
0x00007ffcc88f3990 in krb5_auth_send () from /usr/lib64/sssd/libsss_krb5.so

5. Verify the backend processes.
After some time the sssd_be process terminates, see the processes below:

# ps -e | grep sss
 5266 ?        00:00:00 sssd
 5267 ?        00:00:00 sssd_be <defunct>
 5268 ?        00:00:00 sssd_nss
 5269 ?        00:00:00 sssd_pam
 5270 ?        00:00:00 sssd_sudo

6. Quit the gdb session and observe all the backend processes. 

# ps -e | grep sss
 5266 ?        00:00:00 sssd
 5268 ?        00:00:00 sssd_nss
 5269 ?        00:00:00 sssd_pam
 5270 ?        00:00:00 sssd_sudo
 5293 ?        00:00:00 sssd_be

It can be observed that sssd_be process respawns and sssd_pam remains stable which is expected. With the older builds sssd_pam used to crash.
Comment 12 Jakub Hrozek 2013-09-05 06:14:49 EDT
*** Bug 972699 has been marked as a duplicate of this bug. ***
Comment 13 Jakub Hrozek 2013-09-05 08:06:39 EDT
*** Bug 994526 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Hrozek 2013-09-05 13:33:21 EDT
We're getting quite some reports from the outside about this issue. I'm going to mark the bug as public to avoid users filing duplicates. I went through the comments and I think they are marked private as appropriate.
Comment 15 errata-xmlrpc 2013-11-21 17:16:47 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1680.html

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