]> git.ipfire.org Git - thirdparty/asterisk.git/commit
sched: AST_SCHED_REPLACE_UNREF can lead to use after free of data
authorAlexei Gradinari <alex2grad@gmail.com>
Fri, 2 Oct 2020 19:32:29 +0000 (15:32 -0400)
committerGeorge Joseph <gjoseph@digium.com>
Mon, 9 Nov 2020 14:59:34 +0000 (08:59 -0600)
commitda0f2ea99e178b958e1371484e6b115e3e3e3da7
tree11c0a0b35142ded76214fe8ca74d531e497db676
parent5a6037778b4f661e1eab78e07ce46f94a1ed9533
sched: AST_SCHED_REPLACE_UNREF can lead to use after free of data

The data can be freed if the old object '_data' is the same object as
new 'data'. Because at first the object is unreferenced which can lead
to destroying it.

This could happened in res_pjsip_pubsub when the publication is updated
which could lead to segfault in function publish_expire.

Change-Id: I0164f57c387243510bdbd2f8dcf33377b6c202da
include/asterisk/sched.h