Skip to content

fix: limit WebSocket message size to prevent unbounded memory growth#1544

Open
Cherrling wants to merge 1 commit into
tsl0922:mainfrom
Cherrling:fix/mem-dos-unbounded-buffer
Open

fix: limit WebSocket message size to prevent unbounded memory growth#1544
Cherrling wants to merge 1 commit into
tsl0922:mainfrom
Cherrling:fix/mem-dos-unbounded-buffer

Conversation

@Cherrling

Copy link
Copy Markdown

An unauthenticated attacker can send fragmented WebSocket messages (starting with '{' / JSON_DATA to bypass auth check) causing pss->buffer to grow without limit via xrealloc. Add MAX_MESSAGE_SIZE (10MB) cap; overflow closes the connection.

An unauthenticated attacker can send fragmented WebSocket messages
(starting with '{' / JSON_DATA to bypass auth check) causing pss->buffer
to grow without limit via xrealloc. Add MAX_MESSAGE_SIZE (10MB) cap;
overflow closes the connection.
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