]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Do not crash on ACKs from unknown endpoints.
authorMark Michelson <mmichelson@digium.com>
Tue, 16 Aug 2016 20:34:53 +0000 (15:34 -0500)
committerJoshua Colp <jcolp@digium.com>
Fri, 9 Sep 2016 10:30:46 +0000 (10:30 +0000)
commitf1ffc22933167608db27ccdae8082ae83254d2e4
treec7411b591baed8e6a21bc1e3f5d0d2003555ca94
parentfdb29f1b4eeee4af03942865de1638a3f722511f
res_pjsip: Do not crash on ACKs from unknown endpoints.

The endpoint identification PJSIP module is intended to identify which
endpoint an incoming request is from. If an endpoint is not identified,
then an artificial endpoint is used in its place when proceeding.

The problem is that the ACK request type is an exception to the rule.
The artificial endpoint is not used when processing an ACK. This results
in the possibility of having a NULL endpoint being used further on.

The reason ACK is an exception is an attempt not to spam security logs
with unidentified requests. Presumably, you've already logged the
unidentified request on the preceeding INVITE.

Up until Asterisk 13.10, retrieving a NULL endpoint in this fashion
didn't cause an issue. A new change in 13.10 added endpoint ACL checking
shortly after endpoint identification. Because we are accessing a NULL
endpoint, this ACL check resulted in a crash.

The fix here is to be sure to retrieve the artificial endpoint for all
request types. ACKs still do not generate unidentified request security
events.

ASTERISK-26264 #close
Reported by nappsoft

AST-2016-006

Change-Id: Ie0c795ae2d72273decb972dd74b6a1489fb6b703
res/res_pjsip/pjsip_distributor.c