Skip to content

security: bound livekit audio decode by frame data length - #1035

Open
eordano wants to merge 1 commit into
decentraland:feat/headless-storagefrom
eordano:up/gon-audio-index
Open

security: bound livekit audio decode by frame data length#1035
eordano wants to merge 1 commit into
decentraland:feat/headless-storagefrom
eordano:up/gon-audio-index

Conversation

@eordano

@eordano eordano commented Jul 30, 2026

Copy link
Copy Markdown
Member

The LiveKit audio path indexes a decoded frame using a length taken from the frame header rather than the delivered data, so a peer-supplied frame whose header overstates its payload panics the decode.

Bound the decode by the actual data length.

+4/-2. Reachable from any peer publishing audio. Marginal for a headless server, which has no audio sink and does not subscribe, so this is really client hardening — included because it is peer-triggered and cheap.

The decode loops indexed `frame.data` by the wire-declared samples_per_channel,
so a peer could set it past the buffer and panic. Cap the loop at data.len().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant