mirror of https://github.com/asterisk/asterisk
The parse_simple_message_summary() function uses sscanf with an unbounded %s format specifier to parse the Message-Account field from incoming SIP NOTIFY bodies into a fixed-size 512-byte stack buffer (PJSIP_MAX_URL_SIZE). A single unauthenticated SIP NOTIFY with a Message-Account value exceeding 512 bytes overflows the buffer, corrupting adjacent stack data and permanently disabling the PJSIP transport layer without crashing the process. Add a width specifier (%511s) to limit the sscanf write to PJSIP_MAX_URL_SIZE - 1 bytes plus the NUL terminator, matching the destination buffer size. Resolves: #GHSA-589g-qgf8-m6mxpull/2028/head
parent
56deaaa063
commit
2121ff8ef6
Loading…
Reference in new issue