Ticket #1946 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

Assertion in deinitializing client auth session when dialog creation fails

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.6
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Reported that a segmentation fault occurs after upgrading to PJSIP 2.5.5 and the investigation leads to deinitialization of uninitialized client auth session when dialog creation fails.

Note that pjsip_auth_clt_deinit() has this validity check:

PJ_ASSERT_RETURN(sess && sess->endpt, PJ_EINVAL);

and in dialog creation, sess->endpt should be NULL when client auth session is uninitialized. So the deinitialization of uninitialized session will raise assertion on debug mode, or return error on NDEBUG mode, or crash when accessing NULL pointer when PJ_ENABLE_EXTRA_CHECK is turned off.

Thanks to Pirmin Walthert for the report and the analysis. Original report can be found here.

Change History

comment:1 Changed 8 months ago by nanang

  • Status changed from new to closed
  • Resolution set to fixed

In 5401:

Fix #1946: Avoid deinitialization of uninitialized client auth session.

Note: See TracTickets for help on using tickets.