]> git.ipfire.org Git - thirdparty/asterisk.git/commit
AST-2017-014: res_pjsip - Missing contact header can cause crash
authorKevin Harwell <kharwell@digium.com>
Wed, 20 Dec 2017 22:17:40 +0000 (16:17 -0600)
committerKevin Harwell <kharwell@digium.com>
Fri, 22 Dec 2017 22:07:09 +0000 (16:07 -0600)
commitad5323acfabfe45bc9688e6d1b6ba13085f9f9b9
treec0e00b616fe791dc3e1b87c5aa014cb742ac1ffc
parentde85b88ac60295becec6de9b0b5eed7860f4fcf7
AST-2017-014: res_pjsip - Missing contact header can cause crash

Those SIP messages that create dialogs require a contact header to be present.
If the contact header was missing from the message it could cause Asterisk to
crash.

This patch checks to make sure SIP messages that create a dialog contain the
contact header. If the message does not and it is required Asterisk now returns
a "400 Missing Contact header" response. Also added NULL checks when retrieving
the contact header that were missing as a "just in case".

ASTERISK-27480 #close

Change-Id: I1810db87683fc637a9e3e1384a746037fec20afe
(cherry picked from commit f6757b1d60512e91e60f808a772d9681cbe65dee)
res/res_pjsip.c
res/res_pjsip/pjsip_message_filter.c
res/res_pjsip_pubsub.c