Bug#304691: siproxd: Seg faults systematically at first received message
Marc Poulhies
Marc Poulhies <dkm@kataplop.net>, 304691@bugs.debian.org
Thu, 14 Apr 2005 20:07:14 +0200
Package: siproxd
Version: 1:0.5.10-2
Severity: grave
Justification: renders package unusable
I tried with the 'testing' version before trying the unstable one, but both have the same behavior.
I simply install the package, edit the config file without changing a lot (in/out iface and register net filter).
Then, I start siproxd. Syslog reports this:
Apr 14 19:39:55 minime siproxd[1740]: siproxd.c:208 INFO:siproxd-0.5.10-2836 i386-pc-linux-gnu starting up
Apr 14 19:39:55 minime siproxd[1740]: sock.c:65 INFO:bound to port 5060
Apr 14 19:39:55 minime siproxd[1740]: register.c:65 WARNING:registration file not found, starting with empty table
Apr 14 19:39:55 minime siproxd[1740]: siproxd.c:269 INFO:siproxd-0.5.10-2836 i386-pc-linux-gnu started
Then, when first client tries to register, siproxd segfault. If I enable debuging output, here's what I get:
19:40:14 INFO:siproxd.c:208 siproxd-0.5.10-2836 i386-pc-linux-gnu starting up
19:40:14 readconf.c:69 trying to read config file
19:40:14 readconf.c:90 ... trying /etc/siproxd.conf
19:40:14 readconf.c:203 pc:"if_inbound = eth0"
19:40:14 readconf.c:210 got keyword:"if_inbound"
19:40:14 readconf.c:220 got argument:"eth0"
19:40:14 readconf.c:253 STRING=eth0
19:40:14 readconf.c:203 pc:"if_outbound = eth1"
19:40:14 readconf.c:210 got keyword:"if_outbound"
19:40:14 readconf.c:220 got argument:"eth1"
19:40:14 readconf.c:253 STRING=eth1
19:40:14 readconf.c:203 pc:"hosts_allow_reg = 192.168.0.0/16"
19:40:14 readconf.c:210 got keyword:"hosts_allow_reg"
19:40:14 readconf.c:220 got argument:"192.168.0.0/16"
19:40:14 readconf.c:253 STRING=192.168.0.0/16
19:40:14 readconf.c:203 pc:"sip_listen_port = 5060"
19:40:14 readconf.c:210 got keyword:"sip_listen_port"
19:40:14 readconf.c:220 got argument:"5060"
19:40:14 readconf.c:235 INT4=5060
19:40:14 readconf.c:203 pc:"daemonize = 0"
19:40:14 readconf.c:210 got keyword:"daemonize"
19:40:14 readconf.c:220 got argument:"0"
19:40:14 readconf.c:235 INT4=0
19:40:14 readconf.c:203 pc:"silence_log = 1"
19:40:14 readconf.c:210 got keyword:"silence_log"
19:40:14 readconf.c:220 got argument:"1"
19:40:14 readconf.c:235 INT4=1
19:40:14 readconf.c:203 pc:"log_calls = 1"
19:40:14 readconf.c:210 got keyword:"log_calls"
19:40:14 readconf.c:220 got argument:"1"
19:40:14 readconf.c:235 INT4=1
19:40:14 readconf.c:203 pc:"user = siproxd "
19:40:14 readconf.c:210 got keyword:"user"
19:40:14 readconf.c:220 got argument:"siproxd "
19:40:14 readconf.c:253 STRING=siproxd
19:40:14 readconf.c:203 pc:"chrootjail = /var/lib/siproxd/"
19:40:14 readconf.c:210 got keyword:"chrootjail"
19:40:14 readconf.c:220 got argument:"/var/lib/siproxd/"
19:40:14 readconf.c:253 STRING=/var/lib/siproxd/
19:40:14 readconf.c:203 pc:"registration_file = /var/lib/siproxd/siproxd_registrations"
19:40:14 readconf.c:210 got keyword:"registration_file"
19:40:14 readconf.c:220 got argument:"/var/lib/siproxd/siproxd_registrations"
19:40:14 readconf.c:253 STRING=/var/lib/siproxd/siproxd_registrations
19:40:14 readconf.c:203 pc:"rtp_proxy_enable = 1"
19:40:14 readconf.c:210 got keyword:"rtp_proxy_enable"
19:40:14 readconf.c:220 got argument:"1"
19:40:14 readconf.c:235 INT4=1
19:40:14 readconf.c:203 pc:"rtp_port_low = 7070"
19:40:14 readconf.c:210 got keyword:"rtp_port_low"
19:40:14 readconf.c:220 got argument:"7070"
19:40:14 readconf.c:235 INT4=7070
19:40:14 readconf.c:203 pc:"rtp_port_high = 7079"
19:40:14 readconf.c:210 got keyword:"rtp_port_high"
19:40:14 readconf.c:220 got argument:"7079"
19:40:14 readconf.c:235 INT4=7079
19:40:14 readconf.c:203 pc:"rtp_timeout = 300"
19:40:14 readconf.c:210 got keyword:"rtp_timeout"
19:40:14 readconf.c:220 got argument:"300"
19:40:14 readconf.c:235 INT4=300
19:40:14 readconf.c:203 pc:"default_expires = 600"
19:40:14 readconf.c:210 got keyword:"default_expires"
19:40:14 readconf.c:220 got argument:"600"
19:40:14 readconf.c:235 INT4=600
19:40:14 readconf.c:203 pc:"debug_level = 0x00000000"
19:40:14 readconf.c:210 got keyword:"debug_level"
19:40:14 readconf.c:220 got argument:"0x00000000"
19:40:14 readconf.c:235 INT4=0
19:40:14 readconf.c:203 pc:"debug_port = 0"
19:40:14 readconf.c:210 got keyword:"debug_port"
19:40:14 readconf.c:220 got argument:"0"
19:40:14 readconf.c:235 INT4=0
19:40:14 readconf.c:119 rounded rtp_port_high down to 7078
19:40:14 utils.c:234 running w/uid=0, euid=0, gid=0, egid=0
19:40:14 utils.c:91 initializing DNS cache (32 entries)
19:40:14 utils.c:194 DNS lookup - resolved: localhost -> 127.0.0.1
19:40:14 utils.c:214 DNS lookup - store into cache, entry 0)
19:40:14 utils.c:264 chrooting to /var/lib/siproxd/
19:40:14 utils.c:276 changing uid/gid to siproxd
19:40:14 utils.c:279 changed gid to 107 - Ok
19:40:14 utils.c:283 changed egid to 107 - Ok
19:40:14 utils.c:294 changed euid to 107 - Ok
19:40:14 rtpproxy_relay.c:104 create thread
19:40:14 rtpproxy_relay.c:106 created, sts=0
19:40:14 rtpproxy_relay.c:117 uid=0, euid=107
19:40:14 rtpproxy_relay.c:130 pmin=1, pmax=99, using p=33
19:40:14 INFO:sock.c:65 bound to port 5060
19:40:14 sock.c:66 bound socket 4
19:40:14 WARNING:register.c:65 registration file not found, starting with empty table
19:40:14 INFO:siproxd.c:269 siproxd-0.5.10-2836 i386-pc-linux-gnu started
19:40:14 siproxd.c:276 going into sipsock_wait
19:40:16 register.c:465 sip_agemap, t=1113500416
19:40:18 register.c:465 sip_agemap, t=1113500418
19:40:20 register.c:465 sip_agemap, t=1113500420
19:40:22 register.c:465 sip_agemap, t=1113500422
19:40:24 register.c:465 sip_agemap, t=1113500424
19:40:25 siproxd.c:300 back from sipsock_wait
19:40:25 sock.c:125 received UDP packet from 192.168.0.4, count=354
---BUFFER DUMP follows---
52 45 47 49 53 54 45 52 20 73 69 70 3a 31 39 32 REGISTER sip:192
2e 31 36 38 2e 30 2e 31 20 53 49 50 2f 32 2e 30 .168.0.1 SIP/2.0
0d 0a 56 69 61 3a 20 53 49 50 2f 32 2e 30 2f 55 ..Via: SIP/2.0/U
44 50 20 31 39 32 2e 31 36 38 2e 30 2e 34 3a 35 DP 192.168.0.4:5
30 36 30 3b 72 70 6f 72 74 3b 62 72 61 6e 63 68 060;rport;branch
3d 7a 39 68 47 34 62 4b 36 31 37 34 32 39 31 30 =z9hG4bK61742910
30 0d 0a 46 72 6f 6d 3a 20 3c 73 69 70 3a 64 6b 0..From: <sip:dk
6d 40 73 74 6a 75 2e 6b 61 74 61 70 6c 6f 70 2e m@stju.kataplop.
6e 65 74 3e 3b 74 61 67 3d 31 37 38 34 31 34 36 net>;tag=1784146
38 33 35 0d 0a 54 6f 3a 20 3c 73 69 70 3a 64 6b 835..To: <sip:dk
6d 40 73 74 6a 75 2e 6b 61 74 61 70 6c 6f 70 2e m@stju.kataplop.
6e 65 74 3e 0d 0a 43 61 6c 6c 2d 49 44 3a 20 31 net>..Call-ID: 1
32 30 35 32 38 38 31 32 30 40 31 39 32 2e 31 36 205288120@192.16
38 2e 30 2e 34 0d 0a 43 53 65 71 3a 20 31 20 52 8.0.4..CSeq: 1 R
45 47 49 53 54 45 52 0d 0a 43 6f 6e 74 61 63 74 EGISTER..Contact
3a 20 3c 73 69 70 3a 64 6b 6d 40 38 31 2e 35 36 : <sip:dkm@81.56
2e 32 33 30 2e 31 38 34 3e 0d 0a 4d 61 78 2d 46 .230.184>..Max-F
6f 72 77 61 72 64 73 3a 20 35 0d 0a 55 73 65 72 orwards: 5..User
2d 41 67 65 6e 74 3a 20 4c 69 6e 70 68 6f 6e 65 -Agent: Linphone
2d 31 2e 30 2e 31 2f 65 58 6f 73 69 70 0d 0a 45 -1.0.1/eXosip..E
78 70 69 72 65 73 3a 20 32 30 30 0d 0a 43 6f 6e xpires: 200..Con
74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 30 0d 0a tent-Length: 0..
0d 0a ..
---end of BUFFER DUMP---
19:40:25 accessctl.c:53 deny list (SIP):*NULL*
19:40:25 accessctl.c:55 allow list (SIP):*NULL*
19:40:25 accessctl.c:57 allow list (REG):192.168.0.0/16
19:40:25 accessctl.c:153 [0] extracted address=192.168.0.0
19:40:25 accessctl.c:154 [0] extracted mask =16
19:40:25 utils.c:194 DNS lookup - resolved: 192.168.0.0 -> 192.168.0.0
19:40:25 utils.c:214 DNS lookup - store into cache, entry 1)
19:40:25 accessctl.c:170 [0] (0xc0a80000) <-> (0xc0a80000)
19:40:25 accessctl.c:95 granted REG/SIP access
19:40:25 accessctl.c:102 access check =3
19:40:25 security.c:48 security_check_raw: size=354
19:40:25 siproxd.c:368 checking Max-Forwards (=5)
19:40:25 siproxd.c:414 received SIP type REQ:REGISTER
19:40:25 utils.c:194 DNS lookup - resolved: 192.168.0.1 -> 192.168.0.1
19:40:25 utils.c:214 DNS lookup - store into cache, entry 2)
19:40:25 utils.c:331 initializing ifaddr cache (32 entries)
19:40:25 utils.c:396 get_ip_by_ifname: if eth0 has IP:192.168.0.1 (flags=1043) UP
19:40:25 utils.c:416 ifname lookup - store into cache, entry 0)
19:40:25 utils.c:396 get_ip_by_ifname: if eth1 has IP:81.56.230.184 (flags=1043) UP
19:40:25 utils.c:416 ifname lookup - store into cache, entry 1)
19:40:25 register.c:217 sip_register:
19:40:25 register.c:282 register: dkm@81.56.230.184 expires=200 seconds
19:40:25 register.c:337 create new entry for dkm@81.56.230.184 <-> dkm@stju.kataplop.net at slot=0
19:40:25 register.c:351 0 entries in MASK config table
19:40:25 sock.c:164 send UDP packet to 192.168.0.4: 5060
---BUFFER DUMP follows---
53 49 50 2f 32 2e 30 20 32 30 30 20 4f 4b 0d 0a SIP/2.0 200 OK..
56 69 61 3a 20 53 49 50 2f 32 2e 30 2f 55 44 50 Via: SIP/2.0/UDP
20 31 39 32 2e 31 36 38 2e 30 2e 34 3a 35 30 36 192.168.0.4:506
30 3b 72 70 6f 72 74 3b 62 72 61 6e 63 68 3d 7a 0;rport;branch=z
39 68 47 34 62 4b 36 31 37 34 32 39 31 30 30 0d 9hG4bK617429100.
0a 46 72 6f 6d 3a 20 3c 73 69 70 3a 64 6b 6d 40 .From: <sip:dkm@
73 74 6a 75 2e 6b 61 74 61 70 6c 6f 70 2e 6e 65 stju.kataplop.ne
74 3e 3b 74 61 67 3d 31 37 38 34 31 34 36 38 33 t>;tag=178414683
35 0d 0a 54 6f 3a 20 3c 73 69 70 3a 64 6b 6d 40 5..To: <sip:dkm@
73 74 6a 75 2e 6b 61 74 61 70 6c 6f 70 2e 6e 65 stju.kataplop.ne
74 3e 0d 0a 43 61 6c 6c 2d 49 44 3a 20 31 32 30 t>..Call-ID: 120
35 32 38 38 31 32 30 40 31 39 32 2e 31 36 38 2e 5288120@192.168.
30 2e 34 0d 0a 43 53 65 71 3a 20 31 20 52 45 47 0.4..CSeq: 1 REG
49 53 54 45 52 0d 0a 45 78 70 69 72 65 73 3a 20 ISTER..Expires:
32 30 30 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 200..Content-Len
67 74 68 3a 20 30 0d 0a 0d 0a gth: 0....
---end of BUFFER DUMP---
19:40:25 siproxd.c:276 going into sipsock_wait
19:40:27 register.c:465 sip_agemap, t=1113500427
19:40:29 register.c:465 sip_agemap, t=1113500429
19:40:30 siproxd.c:300 back from sipsock_wait
19:40:30 sock.c:125 received UDP packet from 192.168.0.4, count=500
---BUFFER DUMP follows---
53 55 42 53 43 52 49 42 45 20 73 69 70 3a 64 6b SUBSCRIBE sip:dk
6d 32 40 73 74 6a 75 2e 6b 61 74 61 70 6c 6f 70 m2@stju.kataplop
2e 6e 65 74 20 53 49 50 2f 32 2e 30 0d 0a 56 69 .net SIP/2.0..Vi
61 3a 20 53 49 50 2f 32 2e 30 2f 55 44 50 20 38 a: SIP/2.0/UDP 8
31 2e 35 36 2e 32 33 30 2e 31 38 34 3a 35 30 36 1.56.230.184:506
30 3b 62 72 61 6e 63 68 3d 7a 39 68 47 34 62 4b 0;branch=z9hG4bK
37 30 31 31 34 30 31 39 34 0d 0a 46 72 6f 6d 3a 701140194..From:
20 3c 73 69 70 3a 64 6b 6d 40 73 74 6a 75 2e 6b <sip:dkm@stju.k
61 74 61 70 6c 6f 70 2e 6e 65 74 3e 3b 74 61 67 ataplop.net>;tag
3d 38 36 31 30 32 36 38 33 36 0d 0a 54 6f 3a 20 =861026836..To:
6d 61 72 63 20 32 20 3c 73 69 70 3a 64 6b 6d 32 marc 2 <sip:dkm2
40 73 74 6a 75 2e 6b 61 74 61 70 6c 6f 70 2e 6e @stju.kataplop.n
65 74 3e 0d 0a 43 61 6c 6c 2d 49 44 3a 20 37 38 et>..Call-ID: 78
30 37 32 31 31 30 32 40 31 39 32 2e 31 36 38 2e 0721102@192.168.
30 2e 34 0d 0a 43 53 65 71 3a 20 32 30 20 53 55 0.4..CSeq: 20 SU
42 53 43 52 49 42 45 0d 0a 43 6f 6e 74 61 63 74 BSCRIBE..Contact
3a 20 3c 73 69 70 3a 64 6b 6d 40 38 31 2e 35 36 : <sip:dkm@81.56
2e 32 33 30 2e 31 38 34 3a 35 30 36 30 3e 0d 0a .230.184:5060>..
4d 61 78 2d 46 6f 72 77 61 72 64 73 3a 20 35 0d Max-Forwards: 5.
0a 45 76 65 6e 74 3a 20 70 72 65 73 65 6e 63 65 .Event: presence
0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 4c 69 ..User-Agent: Li
6e 70 68 6f 6e 65 2d 31 2e 30 2e 31 2f 65 58 6f nphone-1.0.1/eXo
73 69 70 0d 0a 45 78 70 69 72 65 73 3a 20 33 36 sip..Expires: 36
30 30 0d 0a 41 6c 6c 6f 77 3a 20 49 4e 56 49 54 00..Allow: INVIT
45 2c 20 41 43 4b 2c 20 43 41 4e 43 45 4c 2c 20 E, ACK, CANCEL,
42 59 45 2c 20 4f 50 54 49 4f 4e 53 2c 20 52 45 BYE, OPTIONS, RE
46 45 52 2c 20 53 55 42 53 43 52 49 42 45 2c 20 FER, SUBSCRIBE,
4e 4f 54 49 46 59 2c 20 4d 45 53 53 41 47 45 0d NOTIFY, MESSAGE.
0a 41 63 63 65 70 74 3a 20 61 70 70 6c 69 63 61 .Accept: applica
74 69 6f 6e 2f 70 69 64 66 2b 78 6d 6c 0d 0a 43 tion/pidf+xml..C
6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 30 ontent-Length: 0
0d 0a 0d 0a ....
---end of BUFFER DUMP---
19:40:30 accessctl.c:53 deny list (SIP):*NULL*
19:40:30 accessctl.c:55 allow list (SIP):*NULL*
19:40:30 accessctl.c:57 allow list (REG):192.168.0.0/16
19:40:30 accessctl.c:153 [0] extracted address=192.168.0.0
19:40:30 accessctl.c:154 [0] extracted mask =16
19:40:30 utils.c:114 DNS lookup - from cache: 192.168.0.0 -> 192.168.0.0
19:40:30 accessctl.c:170 [0] (0xc0a80000) <-> (0xc0a80000)
19:40:30 accessctl.c:95 granted REG/SIP access
19:40:30 accessctl.c:102 access check =3
19:40:30 security.c:48 security_check_raw: size=500
19:40:30 siproxd.c:368 checking Max-Forwards (=5)
19:40:30 siproxd.c:414 received SIP type REQ:SUBSCRIBE
19:40:30 utils.c:358 ifaddr lookup - from cache: eth1 -> 81.56.230.184 UP
19:40:30 proxy.c:87 proxy_request
19:40:30 route_processing.c:63 route_preprocess: no Route header present
19:40:30 utils.c:194 DNS lookup - resolved: 81.56.230.184 -> 81.56.230.184
19:40:30 utils.c:214 DNS lookup - store into cache, entry 3)
19:40:30 proxy.c:149 proxy_request: reghost:81.56.230.184 ip:192.168.0.4
19:40:30 sip_utils.c:262 comparing urls: sip:dkm2@stju.kataplop.net -> sip:dkm@stju.kataplop.net
19:40:30 sip_utils.c:277 compare_url: username mismatch
19:40:30 sip_utils.c:262 comparing urls: sip:dkm2@stju.kataplop.net -> sip:dkm@stju.kataplop.net
19:40:30 sip_utils.c:277 compare_url: username mismatch
19:40:30 sip_utils.c:262 comparing urls: sip:dkm2@stju.kataplop.net -> sip:dkm@stju.kataplop.net
19:40:30 sip_utils.c:277 compare_url: username mismatch
19:40:30 sip_utils.c:262 comparing urls: sip:dkm2@stju.kataplop.net -> sip:dkm@stju.kataplop.net
19:40:30 sip_utils.c:277 compare_url: username mismatch
19:40:30 proxy.c:344 request [SUBSCRIBE] from/to unregistered UA (RQ: dkm@stju.kataplop.net -> dkm2@stju.kataplop.net)
Segmentation fault
The strange thing, is that yesterday, with the testing version, I was able to get something working and I tried
to register/deregister a couple of client, and everything worked fine. AFAIR I only flushed iptables rules, but
this is not the problem as I can't get it working again.
thanks,
Marc
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (900, 'testing'), (300, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages siproxd depends on:
ii adduser 3.63 Add and remove users and groups
ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an
ii libgcc1 1:3.4.3-12 GCC support library
ii libosip2-3 2.2.0-1 Session Initiation Protocol (SIP)
-- no debconf information