Commit Graph

30891 Commits

Author SHA1 Message Date
Kevin Harwell c166589207 Merge "AST-2018-002: Crash with an invalid SDP media format description" 2018-02-21 14:11:29 -06:00
Richard Mudgett f083edc43c manager.c: Fix lseek() parameter order.
ASTERISK-27659

Change-Id: I04a2705d2cb7df250769967bc59e2b397a49b797
2018-02-21 12:56:41 -06:00
Richard Mudgett 39f733406d bridge_simple.c: Fix stream topology handling.
The handling of stream topologies was not protected by channel locks in
simple_bridge_request_stream_topology_change().

* Fixed topology handling to be protected by channel locks where needed in
simple_bridge_request_stream_topology_change().

ASTERISK-27692

Change-Id: Ica5d78a6c7ecf4f0b95fb16de28d3889b32c4776
2018-02-21 12:36:13 -06:00
George Joseph 5458175744 Merge "AST-2018-005: res_pjsip_transport_management: Move to core" 2018-02-21 10:42:28 -06:00
George Joseph a4db014fd6 Merge "AST-2018-005: Fix tdata leaks when calling pjsip_endpt_send_response(2)" 2018-02-21 10:42:19 -06:00
George Joseph 121cbc98cb Merge "AST-2018-005: Add a check for NULL tdata in ast_sip_failover_request" 2018-02-21 10:42:07 -06:00
Joshua Colp 86c75af860 Merge "AST-2018-001: rtp / channel: Don't allow an unnegotiated format to be passed up." 2018-02-21 10:38:49 -06:00
Sean Bright 6436137959 AST-2018-006: Properly handle WebSocket frames with 0 length payload.
In ast_websocket_read() we were not adequately checking that the
payload_len was non-zero before passing it to ws_safe_read(). Calling
ws_safe_read with a len argument of 0 will result in a busy loop until
the underlying socket is closed.

ASTERISK-27658 #close

Change-Id: I9d59f83bc563f711df1a6197c57de473f6b0663a
2018-02-21 10:31:52 -06:00
Kevin Harwell 880c69f00f AST-2018-003: Crash with an invalid SDP fmtp attribute
pjproject's fmtp retrieval function failed to catch invalid fmtp attributes.
Because of this Asterisk would crash if given an SDP with an invalid fmtp
attribute.

When retrieving the format this patch now makes sure the fmtp attribute is
available. If not available it now returns an error status.

ASTERISK-27583 #close

Change-Id: I5cebe000ce2d846cae3af33b6d72c416e51caf2f
2018-02-21 09:26:28 -06:00
Kevin Harwell d3a398cf90 AST-2018-002: Crash with an invalid SDP media format description
pjproject's media format parsing algorithm failed to catch invalid values.
Because of this Asterisk would crash if given an SDP with a invalid media
format description.

When parsing the media format description this patch now properly parses the
value and returns an error status if it can't successfully parse/convert the
value.

ASTERISK-27582 #close

Change-Id: I883b3a4ef85b6972397f7b56bf46c5779c55fdd6
2018-02-21 09:26:05 -06:00
George Joseph 758409de56 AST-2018-005: res_pjsip_transport_management: Move to core
Since res_pjsip_transport_management provides several attack
mitigation features, its functionality moved to res_pjsip and
this module has been removed.  This way the features will always
be available if res_pjsip is loaded.

ASTERISK-27618
Reported By: Sandro Gauci

Change-Id: I21a2d33d9dda001452ea040d350d7a075f9acf0d
2018-02-21 08:14:56 -07:00
George Joseph de871515ba AST-2018-005: Fix tdata leaks when calling pjsip_endpt_send_response(2)
pjsip_distributor:
   authenticate() creates a tdata and uses it to send a challenge or
   failure response.  When pjsip_endpt_send_response2() succeeds, it
   automatically decrements the tdata ref count but when it fails, it
   doesn't.  Since we weren't checking for a return status, we weren't
   decrementing the count ourselves on error and were therefore leaking
   tdatas.

res_pjsip_session:
   session_reinvite_on_rx_request wasn't decrementing the ref count
   if an error happened while sending a 491 response.
   pre_session_setup wasn't decrementing the ref count if
   while sending an error after a pjsip_inv_verify_request failure.

res_pjsip:
   ast_sip_send_response wasn't decrementing the ref count on error.

ASTERISK-27618
Reported By: Sandro Gauci

Change-Id: Iab33a6c7b6fba96148ed465b690ba8534ac961bf
2018-02-21 08:14:47 -07:00
George Joseph c53d8dcb68 AST-2018-005: Add a check for NULL tdata in ast_sip_failover_request
It was discovered that there are some corner cases where a pjsip tsx
might have no last_tx so calling ast_sip_failover_request with
a NULL last_tx as its tdata would cause a crash.

ASTERISK-27618
Reported By:  Sandro Gauci

Change-Id: Ic2b63f6d4ae617c4c19dcdec2a7a6156b54fd15b
2018-02-21 08:14:40 -07:00
Joshua Colp d424850d58 AST-2018-004: Restrict the number of Accept headers in a SUBSCRIBE.
When receiving a SUBSCRIBE request the Accept headers from it are
stored locally. This operation has a fixed limit of 32 Accept headers
but this limit was not enforced. As a result it was possible for
memory outside of the allocated space to get written to resulting
in a crash.

This change enforces the limit so only 32 Accept headers are
processed.

ASTERISK-27640
Reported By: Sandro Gauci

Change-Id: I99a814b10b554b13a6021ccf41111e5bc95e7301
2018-02-21 08:30:31 -06:00
Joshua Colp e70c4ec84d AST-2018-001: rtp / channel: Don't allow an unnegotiated format to be passed up.
When an RTP packet is received by an RTP engine it has to map the
payload into the Asterisk format. The code was incorrectly checking
our own static list for ALL payloads if it couldn't find a negotiated one.
This included dynamic payloads. If the payload mapped to a format
of a different type (for example receiving a video packet on an audio
RTP instance) then the core stream code could cause a crash if a legacy
channel driver was in use as no stream would be present.

To provide further protection the core stream code will no longer assume
that a video or audio frame will always have a stream for legacy channel
drivers. If no stream is present the frame is dropped.

ASTERISK-27488

Change-Id: I022556f524ad8379ee73f14037040af17ea3316a
2018-02-21 08:27:51 -06:00
Jenkins2 a1e6320c4a Merge "channel.c: Fix typo." 2018-02-21 06:47:33 -06:00
Jenkins2 71de3deffe Merge "res_http_websocket: Don't leak memory on read failure" 2018-02-20 13:55:58 -06:00
Richard Mudgett e2f98fbd63 channel.c: Fix typo.
Change-Id: I4eeedf89085697e81c354eb92d546686c67b0b5b
2018-02-20 13:30:23 -06:00
Joshua Colp 259c80675e chan_sip: Emit a second ringing event to ensure channel is found.
When constructing a dialog-info+xml NOTIFY message a ringing channel
is found if the state is ringing and further information is placed into
the message. Due to the migration to the Stasis message bus this did
not always work as expected.

This change raises a second ringing event in such a way to guarantee
that the event is received by chan_sip and another lookup is done to
find the ringing channel.

ASTERISK-24488

Change-Id: I547a458fc59721c918cb48be060cbfc3c88bcf9c
2018-02-20 10:42:58 -06:00
Jenkins2 1b37424517 Merge "doc/lang/language-criteria.txt: Link to wiki." 2018-02-20 10:34:37 -06:00
Jenkins2 3c5784315d Merge "core: Rename sounds_index.c to sounds.c." 2018-02-20 07:05:55 -06:00
Joshua Colp fcf9494112 Merge "BuildSystem: Allow newer autotools on OpenBSD." 2018-02-20 06:20:52 -06:00
Jenkins2 fd353237f0 Merge "config: Fix locking for extconfig reload." 2018-02-20 06:14:08 -06:00
Joshua Colp c1d523c7b3 Merge "BuildSystem: Use single bootstrap.sh for Asterisk and menuselect." 2018-02-20 05:11:29 -06:00
Joshua Colp 7baaed0d3f Merge "BuildSystem: Fix a typo related to ./configure --prefix=<path> on OpenBSD." 2018-02-20 05:11:14 -06:00
Corey Farrell 0ad13949c1 doc/lang/language-criteria.txt: Link to wiki.
This document is out of date and is superseded by content on the
Asterisk wiki.

ASTERISK-24386 #close

Change-Id: Idbf95b27b096c205251e1bbb560c79224ba81822
2018-02-20 04:32:44 -06:00
Jenkins2 ff4351952b Merge "optional_api: Refactor to use vector's and standard allocators." 2018-02-19 20:40:20 -06:00
Jenkins2 fbe2f1fe01 Merge "rtp_engine: Load format name / mime type in uppercase again." 2018-02-19 20:00:24 -06:00
Jenkins2 5bbd68298d Merge "install_prereq: Update OpenBSD libraries." 2018-02-19 19:19:32 -06:00
Jenkins2 699403e4a3 Merge "BuildSystem: Enable IMAP storage on OpenBSD." 2018-02-19 18:09:11 -06:00
Jenkins2 c80ecbc5ae Merge "res_pjsip_header_funcs: Various cleanups" 2018-02-19 18:02:32 -06:00
Jenkins2 f063ea650e Merge "res_pjsip: Use pjsip_sip_uri.user_param instead of other_param" 2018-02-19 08:54:56 -06:00
Thomas Guebels 4b555d7147 res_rtp_asterisk: Fix ICE candidate nomination
If the ICE role is not set right away, we might have a role conflict
that stays undetected and ICE finishing with successful tests and no
candidate nominated. This was introduced by ASTERISK-27088.

To avoid this, we set the role as soon as before but only if the ICE
state permits it: still checking and not yet nominating candidates or
completed.

ASTERISK-27646

Change-Id: I5dbc69ad63cacbb067922850fbb113d479bd729c
2018-02-19 07:38:02 -06:00
Sean Bright 8b18247af6 res_http_websocket: Don't leak memory on read failure
Change-Id: Ic449ea832bc81a1671c0e910c5fbe8c683e3da89
2018-02-19 07:24:51 -06:00
Jenkins2 ddc607f85a Merge "Deprecate legacy modules." 2018-02-19 06:59:00 -06:00
Jenkins2 15886d5833 Merge "manager: Add AMI event Load/Unload" 2018-02-19 06:43:27 -06:00
Jenkins2 cd222e3afa Merge "contrib/script/sip_to_pjsip: add support for realtime" 2018-02-19 06:33:24 -06:00
Jenkins2 42b262c4a0 Merge "res_pjsip: Endpoint destruction does not free DTLS configuration" 2018-02-19 06:23:35 -06:00
Corey Farrell 97c21e9cb3 core: Rename sounds_index.c to sounds.c.
This will make the source filename match the 'module reload sounds'
command.  This will allow conversion to a built-in module in Asterisk 16
without needing to redefine AST_MODULE.

Change-Id: Ifb8e489575b27eb33d8c0b6a531f266670557f6e
2018-02-19 04:21:23 -06:00
Corey Farrell e03f0f9572 config: Fix locking for extconfig reload.
Expand locking to include full reload process for extconfig to ensure
nothing can read the config mappings between clearing and reloading.

Change-Id: I378316bad04f1b599ea82d0fef62b8978a644b92
2018-02-19 03:09:02 -06:00
Sean Bright e4a5c9ccf4 res_pjsip_header_funcs: Various cleanups
* Prefer strcasecmp() over stricmp()
 * Use a list with no lock since we never actually lock
 * Minor cleanups to error messages

Change-Id: I8446f44795ee8f3072e1c1f9193c6912dfc0c42b
2018-02-18 08:07:17 -06:00
Alexander Traud a70c92121d rtp_engine: Load format name / mime type in uppercase again.
This reverts a previous change partly.

ASTERISK-27689

Change-Id: Ia3d2f282db6995be8c1c253b5d52f6038761e8af
2018-02-17 15:49:15 +01:00
Corey Farrell 525c0251c0 BuildSystem: Use single bootstrap.sh for Asterisk and menuselect.
This causes the root bootstrap.sh script to generate configure scripts
for both Asterisk and menuselect.  This ensures that both configure
scripts are generated with the same version of autotools and avoids
situations where shared autoconf macros get modified without
regenerating the menuselect script.

Change-Id: I2bfd8537bbb63b3d46b11efabbb15eaaf9ef731a
2018-02-16 18:02:17 -06:00
Jenkins2 ba75d53669 Merge "bridge_roles: Use a non-locking linked list where appropriate" 2018-02-16 17:48:54 -06:00
Sean Bright 65a4084060 res_pjsip: Endpoint destruction does not free DTLS configuration
ASTERISK-27679 #close
Reported by: Mak Dee

Change-Id: I89a2783a11be0763bf123d1619ed176b6225cf42
2018-02-16 13:38:21 -06:00
Alexander Traud a7e7302ab6 install_prereq: Update OpenBSD libraries.
deleted
 jack sqlite

renamed
 freetds-0.63p1-msdblib to freetds
 mysql-client to mariadb-client

added
 bison bzip2 c-client doxygen e2fsprogs graphviz gsm libical jansson libltdl
 lua neon net-snmp libsrtp portaudio-svn postgresql-client python speexdsp
 subversion uriparser xmlstarlet
 fftw3 libsndfile

ASTERISK-27684

Change-Id: I26bdcb0a1d0e484a8dad1052da97f194aefd3370
2018-02-16 19:42:01 +01:00
Alexander Traud 14796f529e BuildSystem: Allow newer autotools on OpenBSD.
ASTERISK-27683

Change-Id: I5ec9dafbb0c16b6f2740c641980bc2eaaf995624
2018-02-16 19:30:45 +01:00
Jenkins2 77a85bfed7 Merge "res_calendar: Specialized calendars depend on symbols of general calendar." 2018-02-16 10:40:31 -06:00
Torrey Searle 976afd26ab contrib/script/sip_to_pjsip: add support for realtime
Add a new script that can read from legacy realtime peers & generate
an sql file for populating pjsip endpoints, identify, and aor records.

ASTERISK-27348 #close

Change-Id: Idd3d7968a3c9c3ee7936d21acbdaf001b429bf65
2018-02-16 09:27:32 -06:00
Jenkins2 4568894d2a Merge "BuildSystem: Invoke ldconfig with previous path." 2018-02-16 08:46:12 -06:00