Skip to content

chore(review): revert invalid auth and enhanced-audio heuristics - #252

Merged
AlexanderWagnerDev merged 2 commits into
mainfrom
security/fix-auth-bypasses-c5d39e7
Sep 4, 2026
Merged

chore(review): revert invalid auth and enhanced-audio heuristics#252
AlexanderWagnerDev merged 2 commits into
mainfrom
security/fix-auth-bypasses-c5d39e7

Conversation

@cursor

@cursor cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review outcome

Follow-up review found that the proposed fixes introduced regressions and cannot safely implement the reported behavior as written.

Observer callbacks are not authorization hooks

  • on_connect_cb is a fire-and-forget notification callback and cannot approve or reject a connection.
  • on_shared_object_cb is an event-delivery callback; shared-object authorization already has the separate on_shared_object_auth_cb hook.
  • Treating either observer callback as a signal that publish/play must have explicit allow callbacks breaks valid observer-only configurations.

Printable legacy audio payload is not a safe FourCC discriminator

Legacy audio formats with the high SoundFormat bit set can legitimately have arbitrary printable bytes immediately after the first audio-header byte. Therefore bytes 1..5 cannot safely be classified as an enhanced-audio FourCC slot based on printability alone without rejecting valid G.711 μ-law, Speex, or legacy Opus payloads.

Change in this PR

The original changes were reverted in 7b821cea35e6fd8e73989458699ac0a5eecc0100, restoring the pre-PR behavior. The Codex review threads are resolved.

Issues #249, #250, and #251 are intentionally not auto-closed by this PR and should be reassessed separately if a different API/protocol-level remediation is desired.

…dio codec masquerade

- Treat on_connect_cb and on_shared_object_cb as implicit auth hooks so
  publish/play require explicit on_publish_cb/on_play_cb when configured
- Reject ambiguous enhanced-audio headers (IsExHeader bit with printable
  but unrecognized FourCC) instead of falling back to legacy SoundFormat
- Add regression tests for all three paths

Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
@AlexanderWagnerDev

Copy link
Copy Markdown
Contributor

@codex review

@AlexanderWagnerDev
AlexanderWagnerDev marked this pull request as ready for review September 4, 2026 21:49
@cursor

cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b0ad82b2-95f8-44dc-a7e8-f43b024a7439)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a74d5515b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/session/conn.rs Outdated
Comment thread src/session/conn.rs Outdated
Restore the pre-PR conn.rs behavior after review found that observer callbacks are not authorization gates and printable legacy audio payload bytes cannot safely distinguish enhanced FourCC headers.
@cursor

cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a70b5d0c-6ddc-456c-b173-0d3e3a35ff96)

@AlexanderWagnerDev AlexanderWagnerDev changed the title fix(security): close auth bypass gaps for connect/SO callbacks and audio codec masquerade chore(review): revert invalid auth and enhanced-audio heuristics Sep 4, 2026
@AlexanderWagnerDev
AlexanderWagnerDev merged commit 9be3c20 into main Sep 4, 2026
33 checks passed
@AlexanderWagnerDev
AlexanderWagnerDev deleted the security/fix-auth-bypasses-c5d39e7 branch September 4, 2026 22:29
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