]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx: Hold channel lock for exception datastore access
authorTinet-mucw <mucw@ti-net.com.cn>
Fri, 20 Mar 2026 10:17:31 +0000 (03:17 -0700)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Mon, 23 Mar 2026 19:00:00 +0000 (19:00 +0000)
commit2f85c76fb9a944a703aa537f604c4e720d8756fe
tree0a1638abfb0434bf3e48cf0913fbbac6a06adc9a
parentfc931fcba8e4010e30d7e1eae28979003230613c
pbx: Hold channel lock for exception datastore access

ast_channel_datastore_find() and ast_channel_datastore_add() must only be
called while the channel is locked (see channel.h). raise_exception() and the
EXCEPTION dialplan function read path accessed the exception datastore without
holding ast_channel_lock, which could corrupt the per-channel datastore list
under concurrency and lead to crashes during teardown (e.g. double free in
ast_datastore_free).

Resolves: #1831
main/pbx.c