Bug 2575890 (CVE-2026-132177)

Summary: CVE-2026-132177 icecast: use-after-free read in mp3_set_title() via stale inline_url pointer
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A use-after-free vulnerability was found in icecast's handling of inline ICY metadata for MP3 source streams. When processing metadata updates, the mp3_set_title() function may read from a metadata buffer that has already been freed. A remote attacker with source client credentials could leverage this flaw to cause a denial of service of the streaming server or, in some circumstances, to expose recycled memory contents to stream listeners.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-11-18 15:05:02 UTC
A heap use-after-free READ exists in icecast's mp3_set_title() (src/format_mp3.c), reachable over the wire by any client holding source (DJ/encoder) credentials for an MP3 mount whose source connection uses inline ICY metadata (icy-metaint).

Lifecycle (master 1db2c321 / v2.5.0; v2.4.4 line numbers in parentheses):
1. mp3_get_filter_meta() creates a metadata refbuf from an inline ICY block and stores an UNOWNED interior pointer into its heap payload: source_mp3->inline_url = strstr(meta->data+1, "StreamUrl='") (format_mp3.c:684 / :631). The pointer holds no reference, is assigned at exactly this one site, and is never cleared anywhere (state is calloc'd, so it starts NULL).
2. A /admin/metadata?mode=updinfo request (granted to SOURCE/PUT-allowed clients per admin.c:697-710; the same-IP check in command_metadata, admin.c:1388-1391, is trivially satisfied by the source client itself) sets update_metadata, and the source thread's next get_buffer call runs mp3_set_title(), which drops the old metadata refbuf's slot reference and installs a new one (format_mp3.c:353-354 / :308-309) without clearing inline_url.
3. The old refbuf stays alive only through ->associated references on queued stream refbufs (format_mp3.c:704-705). Once those age out of the burst window, queue trimming (source.c:970-985 -> refbuf.c:84-97) frees it. inline_url now dangles into freed heap.
4. A later /admin/metadata update re-enters mp3_set_title(), which reads the dangling pointer via strstr (format_mp3.c:295/:341, v2.4.4 :260/:296) and snprintf("%s") (format_mp3.c:345, v2.4.4 :300), the latter copying freed bytes into the ICY metadata block broadcast to connected listeners.

No race is required (free and use both run on the source thread) and no non-default configuration is needed (reproduced with the default 64 KiB burst window). The defect was introduced in 2009 (upstream r15622 / commit 9e118ca7) and is present and unchanged in v2.4.4, v2.5.0 and master 1db2c321.

Reproduced 2026-11-17 against icecast 2.4.4-26.fc44 rebuilt from SRPM with AddressSanitizer on Rocky Linux 10, driven purely over the ICY wire protocol with an independently written reproducer: AddressSanitizer reports heap-use-after-free READ of size 41 at 17 bytes inside the freed 65-byte metadata refbuf; use stack strstr <- mp3_set_title <- mp3_get_filter_meta <- source_main; free stack refbuf_release <- refbuf_release <- source_main (queue trim); alloc stack refbuf_new <- mp3_get_filter_meta. Under ASan halt_on_error the abort terminates the whole daemon. On stock glibc the typical outcome is a silent stale read rather than a crash (the small chunk is recycled into tcache); a fault remains possible under hardened allocators or on page return.

Impact: read-only primitive. Worst realistic outcomes: a source-thread fault terminating the entire daemon (all mounts and listeners) from the DJ role, or recycled heap contents spliced into listener-facing ICY metadata (bounded by the metadata block size, max 4081 bytes). Proposed CVSS3: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L = 5.4 (Moderate).

Fix: clear source_mp3->inline_url wherever the metadata refbuf it points into is released or replaced - at the mp3_set_title() swap (format_mp3.c:354) and at the refbuf_release() site in mp3_get_filter_meta() (format_mp3.c:682-683). The pointer should only ever be read while it refers to the live metadata refbuf.