Files
asterisk/apps
phoneben 9e5f769e80 app_voicemail_odbc: fix msgnum race and crash on failed STORE
app_voicemail_odbc: fix msgnum race and crash on failed STORE

Two concurrent callers leaving voicemail to the same mailbox could be
assigned the same msgnum because ast_unlock_path() was called before
STORE(), allowing a second thread to read the same LAST_MSG_INDEX()
before the first INSERT committed. The losing thread got a duplicate
key error, but execution continued into notify_new_message() ->
RETRIEVE() because the STORE() return value was not checked.
RETRIEVE() then fetched the winning thread's DB row, mmap'd its blob
size against the locally truncated file, and crashed with SIGBUS.

Hold the path lock through STORE() and bail out on failure.

Fixes: #1653
2026-04-28 16:26:33 +00:00
..
2025-04-28 16:30:09 +00:00
2025-01-29 14:18:25 +00:00
2025-04-28 16:30:09 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-04-28 16:30:09 +00:00
2025-01-29 14:18:25 +00:00
2025-04-28 16:30:09 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-04-28 16:30:09 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-04-28 16:30:09 +00:00
2025-01-29 14:18:25 +00:00
2025-04-28 16:30:09 +00:00
2025-04-28 16:30:09 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-04-28 16:30:09 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-04-28 16:30:09 +00:00
2025-04-28 16:30:09 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-06-02 16:35:34 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00
2025-01-29 14:18:25 +00:00