Bug 805108 - sss_ssh_knownhostproxy infinite loop hangs SSH login
Summary: sss_ssh_knownhostproxy infinite loop hangs SSH login
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Stephen Gallagher
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On: 801451
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-20 15:02 UTC by Stephen Gallagher
Modified: 2020-05-02 16:49 UTC (History)
4 users (show)

Fixed In Version: sssd-1.8.0-17.el6
Doc Type: Bug Fix
Doc Text:
Cause: A programming error caused a loop to be exited only on error. Consequence: When the connection was closed, the loop was not exited, which caused sss_ssh_knownhostsproxy to hang. Fix: Exit the loop when the connection is closed. Result: sss_ssh_knownhostsproxy does not hang when the connection is closed.
Clone Of:
Environment:
Last Closed: 2012-06-20 11:56:15 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 2310 0 None None None 2020-05-02 16:49:11 UTC
Red Hat Product Errata RHBA-2012:0747 0 normal SHIPPED_LIVE sssd bug fix and enhancement update 2012-06-19 19:31:43 UTC

Description Stephen Gallagher 2012-03-20 15:02:18 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/1268

There is an infinite loop in the read/write loop of {{{connect_socket()}}} in sss_ssh_knownhostproxy.c. As a result, logins to systems with knownhostproxy enabled will hang forever.

Comment 1 Stephen Gallagher 2012-03-20 15:39:08 UTC
See BZ #801451 for details on how to reproduce this

Comment 3 Gowrishankar Rajaiyan 2012-03-21 08:20:54 UTC
Make sure knownhostsproxy is enabled.

Relevant sssd.conf:
[domain/lab.eng.pnq.redhat.com]
cache_credentials = True
krb5_store_password_if_offline = True
ipa_domain = lab.eng.pnq.redhat.com
id_provider = ipa
auth_provider = ipa
access_provider = ipa
ldap_account_expire_policy = ipa
ipa_hostname = primenova.lab.eng.pnq.redhat.com
chpass_provider = ipa
ipa_server = primenova.lab.eng.pnq.redhat.com
ldap_tls_cacert = /etc/ipa/ca.crt
debug_level = 9 


# ssh -l shanks primenova.lab.eng.pnq.redhat.com
Connection closed by UNKNOWN

/var/log/message:
Mar 21 01:18:14 primenova sshd[22821]: pam_sss(sshd:account): system info: [The
user account is locked on the server]
Mar 21 01:18:14 primenova sshd[22821]: pam_sss(sshd:account): Access denied for
user shanks: 6 (Permission denied)
Mar 21 01:18:14 primenova sshd[22822]: fatal: Access denied for user shanks by
PAM account configuration

/var/log/sssd/sssd_<domain>.log
(Wed Mar 21 01:18:53 2012) [sssd[be[lab.eng.pnq.redhat.com]]]
[sdap_account_expired_rhds] (0x0400): Performing RHDS access check for user
[shanks]
(Wed Mar 21 01:18:53 2012) [sssd[be[lab.eng.pnq.redhat.com]]]
[sdap_account_expired_rhds] (0x4000): Account for user [shanks] is locked.
(Wed Mar 21 01:18:53 2012) [sssd[be[lab.eng.pnq.redhat.com]]]
[be_pam_handler_callback] (0x0100): Backend returned: (0, 6, <NULL>) [Success]
(Wed Mar 21 01:18:53 2012) [sssd[be[lab.eng.pnq.redhat.com]]]
[be_pam_handler_callback] (0x0100): Sending result [6][lab.eng.pnq.redhat.com]
(Wed Mar 21 01:18:53 2012) [sssd[be[lab.eng.pnq.redhat.com]]]
[be_pam_handler_callback] (0x0100): Sent result [6][lab.eng.pnq.redhat.com]
(Wed Mar 21 01:18:55 2012) [sssd[be[lab.eng.pnq.redhat.com]]] [sbus_dispatch]
(0x4000): dbus conn: ACDEF0
(Wed Mar 21 01:18:55 2012) [sssd[be[lab.eng.pnq.redhat.com]]] [sbus_dispatch]
(0x4000): Dispatching.
(Wed Mar 21 01:18:55 2012) [sssd[be[lab.eng.pnq.redhat.com]]]
[sbus_message_handler] (0x4000): Received SBUS method [ping]



Verified: sssd-1.8.0-17.el6.x86_64

Comment 4 Jan Cholasta 2012-03-30 11:00:46 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:
A programming error caused a loop to be exited only on error.

Consequence:
When the connection was closed, the loop was not exited, which caused sss_ssh_knownhostsproxy to hang.

Fix:
Exit the loop when the connection is closed.

Result:
sss_ssh_knownhostsproxy does not hang when the connection is closed.

Comment 6 errata-xmlrpc 2012-06-20 11:56:15 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-2012-0747.html


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