asterisk/codecs
Milan Kyselica d4ccfd55ff codec_codec2: Only process complete Codec2 frames in decoder
The codec2_samples() function uses floor division (160 * datalen/6)
to compute expected output samples, but the decode loop condition
(x < datalen) iterates with ceiling behavior when datalen is not a
multiple of CODEC2_FRAME_LEN. This mismatch causes the loop to
decode one extra frame beyond what the framework bounds check
budgeted for, leading to an out-of-bounds write on the output buffer.

Change the loop condition to only process complete frames, matching
the floor-division behavior of codec2_samples(). This also prevents
an out-of-bounds read on the input side when fewer than
CODEC2_FRAME_LEN bytes remain.

Resolves: #GHSA-qf8j-jp7h-c5hx
2026-06-25 08:21:09 -06:00
..
g722 Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
gsm codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
ilbc codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
lpc10 codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
speex codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
codec_a_mu.c modules: change module LOAD_FAILUREs to LOAD_DECLINES 2017-04-12 15:57:21 -06:00
codec_adpcm.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
codec_alaw.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
codec_codec2.c codec_codec2: Only process complete Codec2 frames in decoder 2026-06-25 08:21:09 -06:00
codec_dahdi.c xml: Embed module information into core XML documentation. 2021-03-16 10:30:43 -05:00
codec_g722.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
codec_g726.c codecs: Spelling fixes 2021-11-16 06:01:59 -06:00
codec_gsm.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
codec_ilbc.c codecs: Add support for WebRTC iLBC 2.0. 2018-02-12 12:38:21 +01:00
codec_lpc10.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
codec_resample.c Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
codec_speex.c Reduce startup/shutdown verbose logging 2024-02-12 18:46:32 +00:00
codec_ulaw.c codecs: Remove test-law. 2021-01-04 05:00:58 -06:00
codecs.xml download_externals: Use HTTPS for downloads 2022-03-23 18:06:37 -05:00
ex_adpcm.h media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
ex_alaw.h various files - fix some alerts raised by lgtm code analysis 2019-11-18 08:30:45 -06:00
ex_codec2.h codecs: Add Codec 2 mode 2400. 2016-08-24 10:41:58 +02:00
ex_g722.h various files - fix some alerts raised by lgtm code analysis 2019-11-18 08:30:45 -06:00
ex_g726.h media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
ex_gsm.h media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
ex_ilbc.h Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
ex_lpc10.h media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
ex_speex.h media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
ex_ulaw.h various files - fix some alerts raised by lgtm code analysis 2019-11-18 08:30:45 -06:00
log2comp.h Remove as much trailing whitespace as possible. 2017-12-22 09:23:22 -05:00
Makefile codec_resample: Ensure OUTSIDE_SPEEX is defined when necessary 2019-09-08 10:54:23 -05:00