Skip to main content
Menu
Advisories

MoQ subgroup reordering permits excessive memory retention from out-of-order group IDs

GHSA-438C-Q3C2-XJ75Published Updated GitHub

Description

MediaMTX's MoQ publishing path buffers out-of-order subgroups in reorderer.Reorderer.Push() until it can emit them in GroupID order. Before the fix, the reorderer limited only the number of pending subgroups, with no corresponding limit on the aggregate size of their object payloads. A publisher could send subgroups with deliberately non-contiguous GroupIDs, causing each received payload to remain in the pending map instead of being flushed.

Since an individual subgroup payload can be large, the count-based limit allowed a single reorderer to retain hundreds of megabytes before forcing a flush. Reorderers were also created independently for each published track, allowing a publishing session with multiple tracks to multiply the retained memory. An authorized MoQ publisher could exploit this behavior to consume excessive server memory and potentially cause a denial of service.

This was initially mitigated in PR #6112 by adding a 100 MB pending-payload limit to each reorderer. PR #6194 completes the fix by moving that budget into a shared Orchestrator, enforcing a 100 MB limit across all reorderers in a publishing session rather than allowing each track to consume an independent budget.

Affected versions

References

GitHub · bluenviron/mediamtx