[asterisk-bugs] [Asterisk 0012240]: segfaults when calling ber_bvecfree()

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Mar 19 15:17:29 CDT 2008


The following issue has been CLOSED 
====================================================================== 
http://bugs.digium.com/view.php?id=12240 
====================================================================== 
Reported By:                tjormola
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   12240
Category:                   Resources/res_config_ldap
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.6.0-beta5 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 not fixable
Fixed in Version:           
====================================================================== 
Date Submitted:             03-17-2008 12:06 CDT
Last Modified:              03-19-2008 15:17 CDT
====================================================================== 
Summary:                    segfaults when calling ber_bvecfree()
Description: 
I'm experiencing a segfault with each call to ber_bvecfree() in
res_config_ldap.c. I'm not sure how to handle that correctly. For my
testing, I just commented out these calls, but that's hardly a long-term
solution due to memory leaking. Asterisk is compiled against OpenLDAP 2.4.8
and OpenSSL 0.9.8g.

The asterisk I'm using is patched with patches found in these bug reports
http://bugs.digium.com/view.php?id=12234
http://bugs.digium.com/view.php?id=12235
http://bugs.digium.com/view.php?id=12236

I've attached my res_ldap.conf and an LDIF of a test SIP user. Asterisk is
started with command

sudo -u asterisk asterisk -C /path/to/asterisk.conf -d -f

and the segfault is triggered with sipsak

sipsak -a test -U -s sip:test at 192.168.1.1

(test user in the LDAP has password test)

Here's the gdb backtrace

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1226515568 (LWP 17596)]
0xb7cde3ca in free () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
http://bugs.digium.com/view.php?id=0  0xb7cde3ca in free () from
/lib/tls/i686/cmov/libc.so.6
http://bugs.digium.com/view.php?id=1  0xb78ff34a in ber_memfree_x () from
/opt/local/lib/liblber-2.4.so.2
http://bugs.digium.com/view.php?id=2  0xb78ff9b7 in ber_bvfree_x () from
/opt/local/lib/liblber-2.4.so.2
http://bugs.digium.com/view.php?id=3  0xb78ffa37 in ber_bvecfree_x () from
/opt/local/lib/liblber-2.4.so.2
http://bugs.digium.com/view.php?id=4  0xb78ffa85 in ber_bvecfree () from
/opt/local/lib/liblber-2.4.so.2
http://bugs.digium.com/view.php?id=5  0xb794781d in realtime_ldap_result_to_vars
(table_config=0x81c4e58,
ldap_result=0x82205f8, entries_count_ptr=0x0) at res_config_ldap.c:329
http://bugs.digium.com/view.php?id=6  0xb7948db7 in realtime_ldap_base_ap
(entries_count_ptr=0x0,
basedn=<value optimized out>, table_name=<value optimized out>,
ap=0xb6e4a2b4 "ù\fï¶~¤ä¶¹\023ï¶\2305ï¶")
    at res_config_ldap.c:812
http://bugs.digium.com/view.php?id=7  0xb79497c7 in realtime_ldap
(basedn=0xb6e4a198
"dc=sipusers,dc=asterisk,dc=test,dc=net", table_name=0xb6e4a098 "sip",
ap=0xb6e4a2b4 "ù\fï¶~¤ä¶¹\023ï¶\2305ï¶") at
res_config_ldap.c:901
http://bugs.digium.com/view.php?id=8  0x08099041 in ast_load_realtime
(family=0xb6ef0766 "sippeers") at
config.c:2024
http://bugs.digium.com/view.php?id=9  0xb6ec05b6 in find_peer (peer=0xb6e4a47e
"test", sin=0x0, realtime=1)
at chan_sip.c:3538
http://bugs.digium.com/view.php?id=10 0xb6eddbdd in handle_request_register
(p=0x821e438, req=0xb6e4c020,
sin=0xb6e4d258, e=<value optimized out>) at chan_sip.c:10234
http://bugs.digium.com/view.php?id=11 0xb6eec6f4 in handle_incoming
(p=0x821e438, req=0xb6e4c020,
sin=0xb6e4d258, recount=0xb6e4bed4, nounlock=0xb6e4bed0) at
chan_sip.c:17879
http://bugs.digium.com/view.php?id=12 0xb6eee5fa in handle_request_do
(req=0xb6e4c020, sin=0xb6e4d258) at
chan_sip.c:18028
http://bugs.digium.com/view.php?id=13 0xb6eeead7 in sipsock_read (id=0x81c1928,
fd=12, events=1, ignore=0x0)
at chan_sip.c:17956
http://bugs.digium.com/view.php?id=14 0x080ccd34 in ast_io_wait (ioc=0x81df878,
howlong=1000) at io.c:287
http://bugs.digium.com/view.php?id=15 0xb6ed46a3 in do_monitor (data=0x0) at
chan_sip.c:18345
http://bugs.digium.com/view.php?id=16 0x081322eb in dummy_start (data=0x81e16c8)
at utils.c:870
http://bugs.digium.com/view.php?id=17 0xb7c544fb in start_thread () from
/lib/tls/i686/cmov/libpthread.so.0
http://bugs.digium.com/view.php?id=18 0xb7d458ee in clone () from
/lib/tls/i686/cmov/libc.so.6


====================================================================== 

---------------------------------------------------------------------- 
 Corydon76 - 03-19-08 15:17  
---------------------------------------------------------------------- 
Since the patches in those reports are not licensed, there is no way that I
can test this report. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-19-08 15:17  Corydon76      Note Added: 0084289                          
03-19-08 15:17  Corydon76      Status                   assigned => closed  
03-19-08 15:17  Corydon76      Resolution               open => not fixable 
======================================================================




More information about the asterisk-bugs mailing list