[Pkg-voip-commits] [asterisk] 02/05: AST-2013-005: Fix crash caused by invalid SDP
tzafrir at debian.org
tzafrir at debian.org
Thu Aug 29 14:36:34 UTC 2013
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch wheezy
in repository asterisk.
commit fec5197745e62714a05f914d36419ce3e7e69c1e
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date: Wed Aug 28 23:42:15 2013 +0300
AST-2013-005: Fix crash caused by invalid SDP
---
debian/patches/AST-2013-005 | 65 +++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 66 insertions(+)
diff --git a/debian/patches/AST-2013-005 b/debian/patches/AST-2013-005
new file mode 100644
index 0000000..ed6cd35
--- /dev/null
+++ b/debian/patches/AST-2013-005
@@ -0,0 +1,65 @@
+From: Matthew Jordan <mjordan at digium.com>
+Date: Tue, 27 Aug 2013 17:55:59 +0000
+Subject: AST-2013-005: Fix crash caused by invalid SDP
+Bug: https://issues.asterisk.org/jira/browse/ASTERISK-22007
+Origin: http://svnview.digium.com/svn/asterisk?view=rev&rev=397756
+
+If the SIP channel driver processes an invalid SDP that defines media
+descriptions before connection information, it may attempt to reference
+the socket address information even though that information has not yet
+been set. This will cause a crash.
+
+This patch adds checks when handling the various media descriptions that
+ensures the media descriptions are handled only if we have connection
+information suitable for that media.
+
+Thanks to Walter Doekes, OSSO B.V., for reporting, testing, and providing
+the solution to this problem.
+
+Reported by: wdoekes
+Tested by: wdoekes
+patches:
+ issueA22007_sdp_without_c_death.patch uploaded by wdoekes (License 5674)
+
+---
+ channels/chan_sip.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/channels/chan_sip.c
++++ b/channels/chan_sip.c
+@@ -9258,7 +9258,7 @@ static int process_sdp(struct sip_pvt *p
+
+ /* Setup audio address and port */
+ if (p->rtp) {
+- if (portno > 0) {
++ if (sa && portno > 0) {
+ ast_sockaddr_set_port(sa, portno);
+ ast_rtp_instance_set_remote_address(p->rtp, sa);
+ if (debug) {
+@@ -9305,7 +9305,7 @@ static int process_sdp(struct sip_pvt *p
+
+ /* Setup video address and port */
+ if (p->vrtp) {
+- if (vportno > 0) {
++ if (vsa && vportno > 0) {
+ ast_sockaddr_set_port(vsa, vportno);
+ ast_rtp_instance_set_remote_address(p->vrtp, vsa);
+ if (debug) {
+@@ -9322,7 +9322,7 @@ static int process_sdp(struct sip_pvt *p
+
+ /* Setup text address and port */
+ if (p->trtp) {
+- if (tportno > 0) {
++ if (tsa && tportno > 0) {
+ ast_sockaddr_set_port(tsa, tportno);
+ ast_rtp_instance_set_remote_address(p->trtp, tsa);
+ if (debug) {
+@@ -9344,7 +9344,7 @@ static int process_sdp(struct sip_pvt *p
+ }
+ /* Setup image address and port */
+ if (p->udptl) {
+- if (udptlportno > 0) {
++ if (isa && udptlportno > 0) {
+ if (ast_test_flag(&p->flags[1], SIP_PAGE2_SYMMETRICRTP) && ast_test_flag(&p->flags[1], SIP_PAGE2_UDPTL_DESTINATION)) {
+ ast_rtp_instance_get_remote_address(p->rtp, isa);
+ if (!ast_sockaddr_isnull(isa) && debug) {
diff --git a/debian/patches/series b/debian/patches/series
index 3a58959..a8c8cbc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -34,3 +34,4 @@ AST-2013-002
AST-2013-003
bluetooth_bind
AST-2013-004
+AST-2013-005
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git
More information about the Pkg-voip-commits
mailing list