XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

Xiph.Org activity

Jasper Cheng opened issue #2365: vorbis_synthesis_restart() keeps lW/W/nW and the old PCM samples from before the restart at Xiph.Org / Vorbis

vorbis_synthesis_restart() is documented to restore the decoder "to the state it was in after vorbis_synthesis_init()" so it can be used when seeking. It resets centerW, pcm_current, pcm_returned, granulepos, sequence, eofflag and the sample count, but not: lW, W, nW — _vds_shared_init() sets them to 0. After a restart, vorbis_synthesis_blockin() takes the old W as the previous block size, so the first block is overlapped with the previous stream's window size, and vorbis_synthesis_lapout()…

Jasper Cheng opened issue #2060: Floating-point nb_encode(): NaN open-loop gain converted to int (UBSan float-cast-overflow) on in-range input at Xiph.Org / ...

In the floating-point build, nb_encode() quantizes the open-loop excitation gain with int qe = (int)(floor(.5+3.5*log(ol_gain*1.0/SIG_SCALING))); if (qe<0) qe=0; if (qe>31) qe=31; For some valid input ol_gain is NaN (and log(0) would give -inf), and converting that to int is undefined behavior; the clamp after it doesn't help. UBSan reports it on a freshly created narrowband VBR encoder fed with in-range samples: Tested on main (09b569d1), floating-point build, -fsanitize=address,undefined: /*…

Jasper Cheng opened issue #2059: speex_bits_write() / speex_bits_insert_terminator() never return when a caller-supplied buffer is full at Xiph.Org / Speex

With a SpeexBits set up by speex_bits_init_buffer(), if the packed bits end inside the last byte of the buffer, speex_bits_write() never returns. It calls speex_bits_insert_terminator(), whose loop while (bits->bitPtr) speex_bits_pack(bits, 1, 1); relies on each pack advancing bitPtr; with a full non-owned buffer speex_bits_pack() prints "Do not own input buffer: not packing" and returns without packing, so the loop spins forever. A library-owned buffer (speex_bits_init()) is grown instead and…

Jasper Cheng opened issue #2057: speex_bits_set_bit_buffer() on a SpeexBits from speex_bits_init() leaks the allocated buffer: is that combination supported?...

speex_bits_set_bit_buffer() replaces chars and buf_size and sets owner = 0 without looking at the previous buffer. When the struct was set up with speex_bits_init(), the 2000-byte buffer allocated there is no longer referenced, and speex_bits_destroy() does not free it either because owner is now 0. Tested on main (09b569d1), built with -fsanitize=address: #include #include int main(void) { static char data[4] = {0x54, 0x72, (char)0xd4, (char)0xb9}; SpeexBits b; speex_bits_init(&b); /*…

Jasper Cheng commented on issue #2054 at Xiph.Org / Speex

Three more decoder fields that SPEEX_RESET_STATE leaves from the previous stream, in addition to the ones in the description. Each of them still makes a reset decoder differ from a freshly created one after every other field has been reset (when the call was added it was described on speex-dev, 2002-12, as resetting the decoder "to its original state (after creation)"): Field Where Effect after reset max_level, min_level (level) nb_decoder_ctl SPEEX_GET_ACTIVITY is computed from the previous…

Timothy B. Terriberry opened merge request !211: Ignore duplicate short extensions. at Xiph.Org / Opus

We also still convert extension repacketization to be iterator-based, as it avoids the need to guard against stack overflow, which is still possible even with 1-byte extensions (a 20 kB input packet can still produce 21,424 extensions, which requires 334 kB of extension descriptors, which is larger than the pseudostack).

Jean-Marc Valin opened merge request !204: Fix sub-packet extension slicing in repacketizer at Xiph.Org / Opus

opus_repacketizer_cat() stores a multi-frame packet's padding only at its starting frame index, so opus_repacketizer_out_range() starting its scan at begin missed extensions from multi-frame packets starting before begin that overlap [begin, end), and failed to filter out extensions falling outside [begin, end) before renumbering frame indices. Scan from frame 0 for any packet whose frame span overlaps [begin, end), and filter parsed extensions to [begin, end) before shifting frame numbers by…

Haru Code opened issue #2364: Encoder: 0/0 in bark_noise_hybridmp() becomes NaN, then an INT_MIN residue and an audible burst on real music at Xiph.Org / Vorbis

This hits the encoder's unchecked float-to-int casts (psy.c, res0.c) through a NaN, on ordinary music rather than crafted input. The result is a burst that every player reproduces. What happens bark_noise_hybridmp() in lib/psy.c fits a weighted line over each window: D = tN * tXX - tX * tX; R = (A + x * B) / D; if (R < 0.f) R = 0.f; In one short block (128 bins), first call from _vp_noisemask() (offset 140, fixed -1), bin i = 32, window lo = 28, hi = 35, the values are: tN = 9117.96875 tX =…

Ana Bobillo opened merge request !52: [vorbisfile] Fix ov_time_tell, ov_pcm_seek_page and _ov_getlap after bad seeks at Xiph.Org / Vorbis

The three vorbisfile fixes from #2362, as a merge request (the same commits as the v2 patches there): ov_time_tell(): after a failed seek the position is unknown (pcm_offset is -1), and the link search ran past the first link and read vf->vi[-1]. It now returns OV_FALSE, matching the -1 that ov_pcm_tell() already returns, documented for both. Adds test_vorbisfile. ov_pcm_seek_page(): when the walk back reaches the start of the link's data without finding a page to restart from, the seek now…

Michel opened issue #2536: Icecast 2.5.0: use-after-free in thread_create_c() (thread.c:318/322) called from source_recheck_mounts() at Xiph.Org / Icecast-Se...

valgrind memcheck on a source build (-g) of Icecast 2.5.0 while the server was handling client connections reports: Invalid read of size 8 at thread_create_c (thread.c:318) [also thread.c:322] by source_recheck_mounts (source.c:1592) by _slave_thread (slave.c:943) by _start_routine (thread.c:689) Address ... is 40 bytes inside a block of size 48 free'd at free by _free_thread (thread.c:841) by avl_delete (avl.c:459) by _start_routine (thread.c:694) It looks like a race between a thread that is…

Michel opened issue #2535: Icecast 2.5.0: memory grows ~2.5-3 KiB per client connection; event_stream queue is never trimmed (patch included) at Xiph.Org / I...

Summary In Icecast 2.5.0 every client connect/disconnect adds an event to the global event_queue in src/event_stream.c. The queue is only trimmed by event_stream_cleanup_queue(), which runs inside the "Event Stream Thread". That thread is only created when the first client opens the event stream (/admin/eventfeed). On a normal server nobody does that, so the queue grows without bound. In addition, even when the thread does run, events removed from the head of the queue are only flagged removed…

Christoph Grüninger commented on merge request !51 at Xiph.Org / Vorbis

Thank you for your thorough review. I thought this would be a clear issue. If I steal your time, apologies and feel free to close this pull request. I tried to work around Claude Code's security guard-rails. I did not get an example file for crashes. But some more explanations: There’s no good reason for the decoder to accept a dimension-0 codebook. It accepts one because nothing rejects it, not because the format defines it as valid. The header parser doesn’t check dim for every book, so a…

Timothy B. Terriberry commented on merge request !40 at Xiph.Org / Ogg

Part of the issue is that I am not actually sure this is an accident. Negative counts allow rewinding the stream. That said, none of the Xiph libraries use this feature, and in fact all values passed to these functions (and the corresponding oggpackB_ variant and the custom re-implementation in libtheora) are small and bounded: usually small constants, or the lengths of codewords which can be no larger than 32, and not otherwise subject to attacker control. There may be non-Xiph users of these…

Timothy B. Terriberry commented on merge request !51 at Xiph.Org / Vorbis

There is no security concern about an integer divide-by-zero. But without a file to test, it is hard to be sure this patch really fixes an issue. Since it is rejecting files that previously it did not reject, we want to be sure we aren't breaking something. All I can find in the spec about this is, "the partition size must be an even multiple of the codebook dimension," but the spec does not say what to do if it is not, and we do not seem to verify it anywhere (and vorbis_book_decodevs_add(),…