Asterisk: chan_unistim DIALPAGE digit handling can overflow phone_number and crash Asterisk
The advisory, in context
Asterisk is an open source private branch exchange and telephony toolkit. Prior to Asterisk 20.20.1, 21.12.3, 22.10.1, 23.4.1 and Certified Asterisk 20.7-cert11, 22.8-cert3, an out-of-bounds write in chan_unistim DIALPAGE digit handling can overflow the phone_number field and crash Asterisk when an attacker sends a carefully crafted incoming request packet. The chan_unistim module must be loaded and configured with a valid UNISTIM UDP port that the attacker can reach. The attacker must register as a configured phone MAC, or the deployment must have an equivalent production/autoprovisioning path that allows the client to reach the main page. This issue is fixed in Asterisk 20.20.1, 21.12.3, 22.10.1, 23.4.1 and Certified Asterisk 20.7-cert11, 22.8-cert3.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
References
- https://github.com/asterisk/asterisk/security/advisories/GHSA-3g56-cgrh-95p5
- https://github.com/asterisk/asterisk/commit/430f423c84e4e32a462d907632b66c9793236e96
- https://github.com/asterisk/asterisk/commit/6da8e10c210d8e014c27c67235252e1dfc794446
- https://github.com/asterisk/asterisk/commit/6f414ec771eaa3318a4b2d28f70fa387196ae283
- https://github.com/asterisk/asterisk/commit/ce6e2233599b76bc30c33b4816b15609c8ddc8b6
- https://github.com/asterisk/asterisk/commit/d803b5370b05f39a6241b2556eb9894b02148e6a
- https://github.com/asterisk/asterisk/commit/fc3a1cb3c386c962bfca8cd9d533d1390d4ad933
- https://github.com/asterisk/asterisk/commit/ff65e4b0867bee12cdcb3a6219b976ee7ee08963
- https://github.com/asterisk/asterisk/releases/tag/20.20.1
- https://github.com/asterisk/asterisk/releases/tag/21.12.3
- https://github.com/asterisk/asterisk/releases/tag/22.10.1
- https://github.com/asterisk/asterisk/releases/tag/23.4.1
- https://github.com/asterisk/asterisk/releases/tag/certified-20.7-cert11
- https://github.com/asterisk/asterisk/releases/tag/certified-22.8-cert3
- https://github.com/asterisk/asterisk/tree/24.0.0-pre1