Skip to content

Homepage agent: protect against pre-connect audio and memory bugs - #8447

Open
thomasyuill-livekit wants to merge 1 commit into
mainfrom
cursor/homepage-agent-config-fixes-5e03
Open

thomasyuill-livekit wants to merge 1 commit into
mainfrom
cursor/homepage-agent-config-fixes-5e03

Conversation

@thomasyuill-livekit

Copy link
Copy Markdown

Summary

Implements configuration changes to protect the livekit.io homepage voice agent against two framework bugs:

  • AGT-3919: Pre-connect audio infinite loop vulnerability
  • AGT-3920: Unbounded session stream reader memory issue

Changes

  1. Set pre_connect_audio=False in the audio input options

    • Disables the pre-connect audio handler that the homepage doesn't use
    • Completely eliminates the AGT-3919 attack surface
  2. Set job_memory_limit_mb=600 on the AgentServer

    • Caps memory usage per job at 600 MB
    • Contains both bugs by killing runaway jobs before they exhaust container memory
    • Normal operation uses ~200-400 MB, leaving headroom for typical usage
  3. Keep session_host enabled (default behavior)

    • The homepage dev panel reads the lk.agent.session byte stream (see behaviors/frontend_attributes.py)
    • Setting session_host=False would break this functionality

Testing

  • All unit tests pass
  • Code formatting and linting checks pass

Closes MARKT-1576

Open in Web Open in Cursor 

Fixes MARKT-1576

- Set pre_connect_audio=False to remove AGT-3919 vulnerability
- Set job_memory_limit_mb=600 to contain memory-related bugs
- Keep session_host enabled as homepage dev panel uses lk.agent.session stream

Addresses AGT-3919 (pre-connect audio infinite loop) and AGT-3920 (unbounded
session stream reader) by disabling the unused pre-connect audio feature and
capping job memory usage at 600 MB.

Co-authored-by: ThomFoolery <thomasyuill-livekit@users.noreply.github.com>
@thomasyuill-livekit
thomasyuill-livekit requested a review from a team as a code owner November 7, 2026 19:58

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

This branch has not been deployed

No deployments
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.

2 participants