asterisk-15.x: fix AST-2019-003 436/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Fri, 12 Jul 2019 18:23:11 +0000 (20:23 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Fri, 12 Jul 2019 18:23:13 +0000 (20:23 +0200)
https://downloads.asterisk.org/pub/security/AST-2019-003.html

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/asterisk-15.x/Makefile
net/asterisk-15.x/patches/160-AST-2019-003-15.diff [new file with mode: 0644]

index 67ff71e04da1161dc3c06e58ac18ae33d1683581..a73fbc92490951e8c162f87a3e80e426ddb34aea 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asterisk15
 PKG_VERSION:=15.3.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
diff --git a/net/asterisk-15.x/patches/160-AST-2019-003-15.diff b/net/asterisk-15.x/patches/160-AST-2019-003-15.diff
new file mode 100644 (file)
index 0000000..0c8f89a
--- /dev/null
@@ -0,0 +1,39 @@
+From a8cc63a8b2b973d6d34251d74b8d4576d6796dce Mon Sep 17 00:00:00 2001
+From: Francesco Castellano <francesco.castellano@messagenet.it>
+Date: Fri, 28 Jun 2019 18:15:31 +0200
+Subject: [PATCH] chan_sip: Handle invalid SDP answer to T.38 re-invite
+
+The chan_sip module performs a T.38 re-invite using a single media
+stream of udptl, and expects the SDP answer to be the same.
+
+If an SDP answer is received instead that contains an additional
+media stream with no joint codec a crash will occur as the code
+assumes that at least one joint codec will exist in this
+scenario.
+
+This change removes this assumption.
+
+ASTERISK-28465
+
+Change-Id: I8b02845b53344c6babe867a3f0a5231045c7ac87
+---
+
+diff --git a/channels/chan_sip.c b/channels/chan_sip.c
+index fe2ae1e..6251878 100644
+--- a/channels/chan_sip.c
++++ b/channels/chan_sip.c
+@@ -10921,7 +10921,13 @@
+                           ast_rtp_lookup_mime_multiple2(s3, NULL, newnoncodeccapability, 0, 0));
+       }
+-      if (portno != -1 || vportno != -1 || tportno != -1) {
++      /* When UDPTL is negotiated it is expected that there are no compatible codecs as audio or
++       * video is not being transported, thus we continue in this function further up if that is
++       * the case. If we receive an SDP answer containing both a UDPTL stream and another media
++       * stream however we need to check again to ensure that there is at least one joint codec
++       * instead of assuming there is one.
++       */
++      if ((portno != -1 || vportno != -1 || tportno != -1) && ast_format_cap_count(newjointcapability)) {
+               /* We are now ready to change the sip session and RTP structures with the offered codecs, since
+                  they are acceptable */
+               unsigned int framing;