Speex through 1.2.1 Out-of-Bounds Write via speex_bits_read_whole_bytes
Impact
Speex (libspeex) through 1.2.1 contains an out-of-bounds write vulnerability in speex_bits_read_whole_bytes() in libspeex/bits.c that mishandles length truncation for non-owned SpeexBits buffers. Attackers can stream crafted Speex data into buffers set up with speex_bits_init_buffer() or speex_bits_set_bit_buffer() to corrupt heap or stack memory and crash applications.
Source excerpt · VulnCheckAffected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
xiph · speex
Other versions: unaffected
| Version / range | Source status |
|---|---|
| 0 through 1.2.1 (inclusive) | affected |
Original source description
Speex (libspeex) through 1.2.1 contains an out-of-bounds write vulnerability in speex_bits_read_whole_bytes() in libspeex/bits.c that mishandles length truncation for non-owned SpeexBits buffers. Attackers can stream crafted Speex data into buffers set up with speex_bits_init_buffer() or speex_bits_set_bit_buffer() to corrupt heap or stack memory and crash applications.
References
- Source reference github.com/xiph/speex/issues/42
- Source reference github.com/xiph/speex
- Source reference github.com/xiph/speex/blob/Speex-1.2.1/libspeex/bits.c
- Source reference hackmd.io/@haindpwn/speex-bits-read-whole-bytes-oob-write
- Source reference gitlab.xiph.org/xiph/speex/-/merge_requests/32
- Security advisory www.vulncheck.com/advisories/speex-through-1.2.1-out-of-bounds-write-via-speex-bits-read-whole-bytes