RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 951086 - sssd segfaults (sssd_be & sssd_pam) with use-after-free error if the back end request takes too long
Summary: sssd segfaults (sssd_be & sssd_pam) with use-after-free error if the back end...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd
Version: 6.4
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Jakub Hrozek
QA Contact: Kaushik Banerjee
URL:
Whiteboard:
: 972699 994526 (view as bug list)
Depends On: 923813
Blocks: 928849 960054 986824
TreeView+ depends on / blocked
 
Reported: 2013-04-11 12:47 UTC by Dmitri Pal
Modified: 2020-05-04 10:35 UTC (History)
16 users (show)

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.
Clone Of: 923813
Environment:
Last Closed: 2013-11-21 22:16:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 2911 0 None closed pam responder segfaults if the client disconnects before the operation finishes 2020-07-06 14:40:56 UTC
Red Hat Product Errata RHBA-2013:1680 0 normal SHIPPED_LIVE sssd bug fix and enhancement update 2013-11-20 21:52:37 UTC

Comment 1 Jakub Hrozek 2013-05-10 15:08:56 UTC
Fixed upstream.

Comment 6 Eugene Keck 2013-07-19 15:23:36 UTC
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 21:20:31 UTC
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 10:14:49 UTC
*** Bug 972699 has been marked as a duplicate of this bug. ***

Comment 13 Jakub Hrozek 2013-09-05 12:06:39 UTC
*** Bug 994526 has been marked as a duplicate of this bug. ***

Comment 14 Jakub Hrozek 2013-09-05 17:33:21 UTC
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 22:16:47 UTC
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.