[asterisk-bugs] [JIRA] (ASTERISK-30215) Inbound SIP INVITE with Geo Location causing a Segmentation Fault

George Joseph (JIRA) noreply at issues.asterisk.org
Tue Sep 13 08:25:08 CDT 2022


     [ https://issues.asterisk.org/jira/browse/ASTERISK-30215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Joseph updated ASTERISK-30215:
-------------------------------------

    Description: 
I have two VMs running Asterisk.

On one Asterisk VM, I have an AMI connection and send an Action: Originate.  Passing in a Variable: 
{code}
GEOLOC_PROFILE(usage_rules)="retransmission-allowed=true",GEOLOC_PROFILE(allow_routing_use)="yes",GEOLOC_PROFILE(pidf_element)="tuple",GEOLOC_PROFILE(confidence)="pdf=Normal,value=80",GEOLOC_PROFILE(location_info)="country=CA,A1=QC,A2=,A3=COOKSHIRE EATON,HNO=160,RD=POPE,PC=J0B 1M0,NAM=CENTRE DE SANTE COOKSHIRE",GEOLOC_PROFILE(method)="Manual",GEOLOC_PROFILE(format)="civicAddress"
{code}

It appears to process the received SIP INVITE

{code}
INVITE sip:3333 at 192.168.33.33 SIP/2.0^M
Via: SIP/2.0/UDP 192.168.33.31:5060;rport;branch=z9hG4bKPj4e566f4f-6e6a-450a-a1d6-6c57d5700770^M
From: "John Doe" <sip:1234 at 192.168.33.31>;tag=80dfd6f0-2515-4d26-bb2d-d4119e538d3c^M
To: <sip:3333 at 192.168.33.33>^M
Contact: <sip:asterisk at 192.168.33.31:5060>^M
Call-ID: 9d26436d-aeba-4f01-b272-2afe9f61b1c0^M
CSeq: 16531 INVITE^M
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER^M
Supported: 100rel, timer, replaces, norefersub, histinfo^M
Session-Expires: 1800^M
Min-SE: 90^M
Geolocation: <cid:acxpf at 192.168.33.31>^M
Geolocation-Routing: yes^M
Max-Forwards: 70^M
User-Agent: Asterisk PBX 18.14.0^M
Content-Type: multipart/mixed;boundary=77249240-1983-4c2c-8b14-f5982cd3823b^M
Content-Length:  1481^M
^M
^M
--77249240-1983-4c2c-8b14-f5982cd3823b^M
Content-Type: application/sdp^M
Content-Length:   183^M
^M
v=0^M
o=- 1937398081 1937398081 IN IP4 192.168.33.31^M
s=Asterisk^M
c=IN IP4 192.168.33.31^M
t=0 0^M
m=audio 11354 RTP/AVP 0^M
a=rtpmap:0 PCMU/8000^M
a=ptime:20^M
a=maxptime:150^M
a=sendrecv^M
^M
--77249240-1983-4c2c-8b14-f5982cd3823b^M
Content-ID: <acxpf at 192.168.33.31>^M
Content-Type: application/pidf+xml^M
Content-Length:  1018^M
^M
<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:gbp="urn:ietf:params:xml:\
ns:pidf:geopriv10:basicPolicy" xmlns:gml="http://www.opengis.net/gml" xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" xmlns:gs="http://www.opengis.net/pidflo/1.0" xmlns:con="urn:ietf:params:xml:ns:geopriv:conf" xmlns:date="http://exslt\
.org/dates-and-times" entity="PJSIP/192.168.33.33-00000006">
  <tuple>
    <status>
      <gp:geopriv>
        <gp:location-info>
          <ca:civicAddress xml:lang="en"/>
          <con:confidence pdf="Normal">80</con:confidence>
        </gp:location-info>
        <gp:usage-rules>
          <gp:retransmission-allowed>true</gp:retransmission-allowed>
        </gp:usage-rules>
        <gp:method>Manual</gp:method>
      </gp:geopriv>
    </status>
    <timestamp>2022-09-08T18:29:46Z</timestamp>
  </tuple>
</presence>
^M
--77249240-1983-4c2c-8b14-f5982cd3823b--^M
{code}

Sends a Trying response.
At this point, I hear my disk thrashing from the CPU/memory for the two VMs.  After a second or so, Asterisk outputs a Segmentation Fault

  was:
I have two VMs running Asterisk.

On one Asterisk VM, I have an AMI connection and send an Action: Originate.  Passing in a Variable: GEOLOC_PROFILE(usage_rules)="retransmission-allowed=true",GEOLOC_PROFILE(allow_routing_use)="yes",GEOLOC_PROFILE(pidf_element)="tuple",GEOLOC_PROFILE(confidence)="pdf=Normal,value=80",GEOLOC_PROFILE(location_info)="country=CA,A1=QC,A2=,A3=COOKSHIRE EATON,HNO=160,RD=POPE,PC=J0B 1M0,NAM=CENTRE DE SANTE COOKSHIRE",GEOLOC_PROFILE(method)="Manual",GEOLOC_PROFILE(format)="civicAddress"

It appears to process the received SIP INVITE

INVITE sip:3333 at 192.168.33.33 SIP/2.0^M
Via: SIP/2.0/UDP 192.168.33.31:5060;rport;branch=z9hG4bKPj4e566f4f-6e6a-450a-a1d6-6c57d5700770^M
From: "John Doe" <sip:1234 at 192.168.33.31>;tag=80dfd6f0-2515-4d26-bb2d-d4119e538d3c^M
To: <sip:3333 at 192.168.33.33>^M
Contact: <sip:asterisk at 192.168.33.31:5060>^M
Call-ID: 9d26436d-aeba-4f01-b272-2afe9f61b1c0^M
CSeq: 16531 INVITE^M
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER^M
Supported: 100rel, timer, replaces, norefersub, histinfo^M
Session-Expires: 1800^M
Min-SE: 90^M
Geolocation: <cid:acxpf at 192.168.33.31>^M
Geolocation-Routing: yes^M
Max-Forwards: 70^M
User-Agent: Asterisk PBX 18.14.0^M
Content-Type: multipart/mixed;boundary=77249240-1983-4c2c-8b14-f5982cd3823b^M
Content-Length:  1481^M
^M
^M
--77249240-1983-4c2c-8b14-f5982cd3823b^M
Content-Type: application/sdp^M
Content-Length:   183^M
^M
v=0^M
o=- 1937398081 1937398081 IN IP4 192.168.33.31^M
s=Asterisk^M
c=IN IP4 192.168.33.31^M
t=0 0^M
m=audio 11354 RTP/AVP 0^M
a=rtpmap:0 PCMU/8000^M
a=ptime:20^M
a=maxptime:150^M
a=sendrecv^M
^M
--77249240-1983-4c2c-8b14-f5982cd3823b^M
Content-ID: <acxpf at 192.168.33.31>^M
Content-Type: application/pidf+xml^M
Content-Length:  1018^M
^M
<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:gbp="urn:ietf:params:xml:\
ns:pidf:geopriv10:basicPolicy" xmlns:gml="http://www.opengis.net/gml" xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" xmlns:gs="http://www.opengis.net/pidflo/1.0" xmlns:con="urn:ietf:params:xml:ns:geopriv:conf" xmlns:date="http://exslt\
.org/dates-and-times" entity="PJSIP/192.168.33.33-00000006">
  <tuple>
    <status>
      <gp:geopriv>
        <gp:location-info>
          <ca:civicAddress xml:lang="en"/>
          <con:confidence pdf="Normal">80</con:confidence>
        </gp:location-info>
        <gp:usage-rules>
          <gp:retransmission-allowed>true</gp:retransmission-allowed>
        </gp:usage-rules>
        <gp:method>Manual</gp:method>
      </gp:geopriv>
    </status>
    <timestamp>2022-09-08T18:29:46Z</timestamp>
  </tuple>
</presence>
^M
--77249240-1983-4c2c-8b14-f5982cd3823b--^M

Sends a Trying response.
At this point, I hear my disk thrashing from the CPU/memory for the two VMs.  After a second or so, Asterisk outputs a Segmentation Fault


> Inbound SIP INVITE with Geo Location causing a Segmentation Fault
> -----------------------------------------------------------------
>
>                 Key: ASTERISK-30215
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30215
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_geolocation
>    Affects Versions: 18.14.0
>         Environment: Ubuntu 20 running in a HyperV VM
>            Reporter: Dan Cropp
>            Assignee: George Joseph
>         Attachments: core-asterisk-2022-09-08T18-29-49Z-brief.txt, core-asterisk-2022-09-08T18-29-49Z-full.txt, core-asterisk-2022-09-08T18-29-49Z-info.txt, core-asterisk-2022-09-08T18-29-49Z-locks.txt, core-asterisk-2022-09-08T18-29-49Z-thread1.txt
>
>
> I have two VMs running Asterisk.
> On one Asterisk VM, I have an AMI connection and send an Action: Originate.  Passing in a Variable: 
> {code}
> GEOLOC_PROFILE(usage_rules)="retransmission-allowed=true",GEOLOC_PROFILE(allow_routing_use)="yes",GEOLOC_PROFILE(pidf_element)="tuple",GEOLOC_PROFILE(confidence)="pdf=Normal,value=80",GEOLOC_PROFILE(location_info)="country=CA,A1=QC,A2=,A3=COOKSHIRE EATON,HNO=160,RD=POPE,PC=J0B 1M0,NAM=CENTRE DE SANTE COOKSHIRE",GEOLOC_PROFILE(method)="Manual",GEOLOC_PROFILE(format)="civicAddress"
> {code}
> It appears to process the received SIP INVITE
> {code}
> INVITE sip:3333 at 192.168.33.33 SIP/2.0^M
> Via: SIP/2.0/UDP 192.168.33.31:5060;rport;branch=z9hG4bKPj4e566f4f-6e6a-450a-a1d6-6c57d5700770^M
> From: "John Doe" <sip:1234 at 192.168.33.31>;tag=80dfd6f0-2515-4d26-bb2d-d4119e538d3c^M
> To: <sip:3333 at 192.168.33.33>^M
> Contact: <sip:asterisk at 192.168.33.31:5060>^M
> Call-ID: 9d26436d-aeba-4f01-b272-2afe9f61b1c0^M
> CSeq: 16531 INVITE^M
> Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER^M
> Supported: 100rel, timer, replaces, norefersub, histinfo^M
> Session-Expires: 1800^M
> Min-SE: 90^M
> Geolocation: <cid:acxpf at 192.168.33.31>^M
> Geolocation-Routing: yes^M
> Max-Forwards: 70^M
> User-Agent: Asterisk PBX 18.14.0^M
> Content-Type: multipart/mixed;boundary=77249240-1983-4c2c-8b14-f5982cd3823b^M
> Content-Length:  1481^M
> ^M
> ^M
> --77249240-1983-4c2c-8b14-f5982cd3823b^M
> Content-Type: application/sdp^M
> Content-Length:   183^M
> ^M
> v=0^M
> o=- 1937398081 1937398081 IN IP4 192.168.33.31^M
> s=Asterisk^M
> c=IN IP4 192.168.33.31^M
> t=0 0^M
> m=audio 11354 RTP/AVP 0^M
> a=rtpmap:0 PCMU/8000^M
> a=ptime:20^M
> a=maxptime:150^M
> a=sendrecv^M
> ^M
> --77249240-1983-4c2c-8b14-f5982cd3823b^M
> Content-ID: <acxpf at 192.168.33.31>^M
> Content-Type: application/pidf+xml^M
> Content-Length:  1018^M
> ^M
> <?xml version="1.0"?>
> <presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:ca="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:gbp="urn:ietf:params:xml:\
> ns:pidf:geopriv10:basicPolicy" xmlns:gml="http://www.opengis.net/gml" xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" xmlns:gs="http://www.opengis.net/pidflo/1.0" xmlns:con="urn:ietf:params:xml:ns:geopriv:conf" xmlns:date="http://exslt\
> .org/dates-and-times" entity="PJSIP/192.168.33.33-00000006">
>   <tuple>
>     <status>
>       <gp:geopriv>
>         <gp:location-info>
>           <ca:civicAddress xml:lang="en"/>
>           <con:confidence pdf="Normal">80</con:confidence>
>         </gp:location-info>
>         <gp:usage-rules>
>           <gp:retransmission-allowed>true</gp:retransmission-allowed>
>         </gp:usage-rules>
>         <gp:method>Manual</gp:method>
>       </gp:geopriv>
>     </status>
>     <timestamp>2022-09-08T18:29:46Z</timestamp>
>   </tuple>
> </presence>
> ^M
> --77249240-1983-4c2c-8b14-f5982cd3823b--^M
> {code}
> Sends a Trying response.
> At this point, I hear my disk thrashing from the CPU/memory for the two VMs.  After a second or so, Asterisk outputs a Segmentation Fault



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list