Skip to content

fix: reject over-deep pre-auth websocket frames - #477

Merged
zackees merged 2 commits into
masterfrom
fix/99-websocket-depth
Oct 13, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/99-websocket-depth

Conversation

@zackees

@zackees zackees commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

Use the bounded parser from merged obs-rust/obs-websocket#2 and point the submodule at the project fork. Add a Tier 4 wire regression that sends deeply nested JSON and MsgPack before Identify, expects close 4002, and verifies OBS remains alive.

Closes #99.

RED → GREEN

  • RED commit bd656e641: against the original in-tree plugin, the valid over-deep JSON envelope did not close with 4002. OBS 32.1.2 also died on the deep MsgPack frame (1006); the in-tree baseline closed that frame with 4002.
  • GREEN commit 913eaf429: the built in-tree OBS app returned 4002 for both frames and stayed alive. The plugin and frontend compiled successfully.

Validation

  • ./lint and ./unittest passed; OFF/ON libobs exported symbols matched (1,766).
  • The local gate passed and stamped HEAD (8d06e60dc12a).
  • The full attached Tier 4 run reached request coverage and then hit an intermittent in-tree OBS SIGSEGV at GetOutputList. The same crash reproduced with the original plugin and without the new depth case, so it is tracked separately in bug: in-tree OBS intermittently crashes during websocket Tier 4 request coverage #476. An original-plugin baseline also completed 147/147 request types in the same build.

Local-Gate: v1 tree=7ff89133c18d248f7e45178d0f4c0f96aad17854 secs=112 lanes=lint:run,rust-test:run,tier2-linux:run
Ci-Attestation: {"at":1791875628,"gate":"rust/all/fmt","host":"linux-x86_64","key":"751eeaf9762684aa537892e08f7d565313330a4cd168fa50b655018e13959b38","lane":"lint","parents":["bd656e6419fb6082d8f482e6553c26c9aa683c21"],"secs":18,"stamp":"efa0eaeecdd73f631421cf726d138863","tree":"7ff89133c18d248f7e45178d0f4c0f96aad17854","v":1,"via":"run"}
Ci-Attestation: {"at":1791875628,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"751eeaf9762684aa537892e08f7d565313330a4cd168fa50b655018e13959b38","lane":"lint","parents":["bd656e6419fb6082d8f482e6553c26c9aa683c21"],"secs":18,"stamp":"ed5990565117cc90562795bf113b087a","tree":"7ff89133c18d248f7e45178d0f4c0f96aad17854","v":1,"via":"run"}
Ci-Attestation: {"at":1791875628,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"128573b129bb7fbee0be9c7648b29ce7980657698f9a909a4dca82326f190e6d","lane":"rust-test","parents":["bd656e6419fb6082d8f482e6553c26c9aa683c21"],"secs":43,"stamp":"d4b215de0f54fa89b4e5299b8efc0a19","tree":"7ff89133c18d248f7e45178d0f4c0f96aad17854","v":1,"via":"run"}
Ci-Attestation: {"at":1791875628,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"515b359dc1495e102e66fb056ce16b3b6822b9cdd868de5271fc0ee94ebc0bfe","lane":"tier2-linux","parents":["bd656e6419fb6082d8f482e6553c26c9aa683c21"],"secs":50,"stamp":"cbab409036060cde94fe7d90bb63c06b","tree":"7ff89133c18d248f7e45178d0f4c0f96aad17854","v":1,"via":"run"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[crash] obs-websocket: deeply nested JSON/MsgPack payload overflows the stack pre-auth

1 participant