Bug 966554

Summary: sssd crashes if junk is present in sssd.conf
Product: Red Hat Enterprise Linux 7 Reporter: Dmitri Pal <dpal>
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED CURRENTRELEASE QA Contact: Kaushik Banerjee <kbanerje>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: apeetham, grajaiya, jgalipea, pbrezina
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.10.0-10.el7.beta2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:30:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dmitri Pal 2013-05-23 13:25:57 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/1934

- sssd version used is sssd-1.10.0-6.fc20.beta1
- Edit sssd.conf and add the word "junk" at the start of the file (I hit this issue due a mistake in the automation script which placed junk characters in sssd.conf).
- Restart sssd
- sssd crashes with the below backtrace.

{{{
Core was generated by `/usr/sbin/sssd -D -f'.
Program terminated with signal 11, Segmentation fault.
#0  __GI___libc_free (mem=0x29) at malloc.c:2896
2896	  if (chunk_is_mmapped(p))                       /* release mmapped memory. */

Thread 1 (Thread 0xb6ea16c0 (LWP 9632)):
#0  __GI___libc_free (mem=0x29) at malloc.c:2896
        ar_ptr = <optimized out>
        p = <optimized out>
        hook = 0x0
#1  0xb759254f in col_delete_item_with_cb () from /lib/libcollection.so.2
No symbol table info available.
#2  0xb75925c6 in col_delete_collection () from /lib/libcollection.so.2
No symbol table info available.
#3  0xb7592fcc in col_destroy_collection () from /lib/libcollection.so.2
No symbol table info available.
#4  0xb75a80af in ini_config_destroy (ini_config=0xb7ffb2e0) at ini/ini_configobj.c:110
No locals.
#5  0xb770e018 in sss_ini_config_destroy (init_data=init_data@entry=0xb7ffbcd8) at src/util/sss_ini.c:324
No locals.
#6  0xb77cb789 in confdb_init_db (config_file=config_file@entry=0xb7ff81d8 "/etc/sssd/sssd.conf", cdb=0xb7ff82f0) at src/confdb/confdb_setup.c:313
        tmp_ctx = 0xb7ffbca0
        ret = 5
        sret = <optimized out>
        version = <optimized out>
        timestr = "1368783035\000\000\000\240\201\377\267\000\000\000"
        lasttimestr = 0x0
        in_transaction = <optimized out>
        config_ldif = 0x0
        vals = {0xbf94d9c7 "1368783035", 0x0}
        ldif = <optimized out>
        init_data = 0xb7ffbcd8
        __FUNCTION__ = "confdb_init_db"
#7  0xb77b7e24 in load_configuration (monitor=<synthetic pointer>, config_file=0xb7ff81d8 "/etc/sssd/sssd.conf", mem_ctx=0xb7ff81a0) at src/monitor/monitor.c:1613
        ret = <optimized out>
        ctx = 0xb7ff8220
        cdb_file = 0x0
#8  main (argc=3, argv=0xbf94dc34) at src/monitor/monitor.c:2766
        opt = <optimized out>
        pc = <optimized out>
        opt_daemon = 1
        opt_interactive = 0
        opt_version = 0
        opt_config_file = 0x0
        config_file = 0xb7ff81d8 "/etc/sssd/sssd.conf"
        flags = 5
        main_ctx = 0x1
        tmp_ctx = 0xb7ff81a0
        monitor = <optimized out>
        ret = <optimized out>
        uid = <optimized out>
        long_options = {{longName = 0x0, shortName = 0 '\000', argInfo = 4, arg = 0xb7698120 <poptHelpOptions>, val = 0, descrip = 0xb77ce655 "Help options:", argDescrip = 0x0}, {longName = 0xb77ce663 "debug-level", shortName = 100 'd', argInfo = 2, arg = 0xb7193094 <debug_level>, val = 0, descrip = 0xb77ce66f "Debug level", argDescrip = 0x0}, {longName = 0xb77cddf6 "debug-to-files", shortName = 102 'f', argInfo = 0, arg = 0xb7193090 <debug_to_file>, val = 0, descrip = 0xb77cf680 "Send the debug output to files instead of stderr", argDescrip = 0x0}, {longName = 0xb77ce67b "debug-timestamps", shortName = 0 '\000', argInfo = 2, arg = 0xb719307c <debug_timestamps>, val = 0, descrip = 0xb77ce68c "Add debug timestamps", argDescrip = 0x0}, {longName = 0xb77ce6a1 "debug-microseconds", shortName = 0 '\000', argInfo = 2, arg = 0xb7193078 <debug_microseconds>, val = 0, descrip = 0xb77cf6b4 "Show timestamps with microseconds", argDescrip = 0x0}, {longName = 0xb77ce6b4 "daemon", shortNa!
 me = 68 'D', argInfo = 0, arg = 0xbf94da38, val = 0, descrip = 0xb77ce6bb "Become a daemon (default)", argDescrip = 0x0}, {longName = 0xb77ce6d5 "interactive", shortName = 105 'i', argInfo = 0, arg = 0xbf94da3c, val = 0, descrip = 0xb77cf6d8 "Run interactive (not a daemon)", argDescrip = 0x0}, {longName = 0xb77d0667 "config", shortName = 99 'c', argInfo = 1, arg = 0xbf94da44, val = 0, descrip = 0xb77cf6f8 "Specify a non-default config file", argDescrip = 0x0}, {longName = 0xb77d0659 "version", shortName = 0 '\000', argInfo = 0, arg = 0xbf94da40, val = 0, descrip = 0xb77ce6e1 "Print version number and exit", argDescrip = 0x0}, {longName = 0x0, shortName = 0 '\000', argInfo = 0, arg = 0x0, val = 0, descrip = 0x0, argDescrip = 0x0}}
        __FUNCTION__ = "main"
}}}

Comment 1 Jakub Hrozek 2013-10-04 13:23:13 UTC
Temporarily moving bugs to MODIFIED to work around errata tool bug

Comment 3 Amith 2013-12-06 07:55:11 UTC
Verified the bug on SSSD Version : sssd-1.10.0-6.fc20.beta1

Steps followed during verification:

1. Add junk at the start of sssd.conf file.
2. Restart sssd service.

The sssd service fails to start with the below error. sssd doesn't crash as expected.

# systemctl start sssd
Job for sssd.service failed. See 'systemctl status sssd.service' and 'journalctl -xn' for details.

# systemctl status sssd
sssd.service - System Security Services Daemon
   Loaded: loaded (/usr/lib/systemd/system/sssd.service; disabled)
   Active: failed (Result: exit-code) since Fri 2013-12-06 13:10:35 IST; 8s ago
  Process: 2520 ExecStart=/usr/sbin/sssd -D -f (code=exited, status=4)

Dec 06 13:10:34 rhel-7.redhat.com systemd[1]: Starting System Security Services Daemon...
Dec 06 13:10:35 rhel-7.redhat.com systemd[1]: sssd.service: control process exited, code=exited status=4
Dec 06 13:10:35 rhel-7.redhat.com systemd[1]: Failed to start System Security Services Daemon.
Dec 06 13:10:35 rhel-7.redhat.com systemd[1]: Unit sssd.service entered failed state.

Comment 4 Ludek Smid 2014-06-13 11:30:19 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.