#79 finding 6 (MEDIUM): raise require_room_authority bar + re-check authority at commit #86
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dark/nether-voicebridge#86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the #79 review. Not fixed (design-sensitive — could affect legitimate moderators, so wants a deliberate decision).
evaluate_sender_authoritytreats sender power >= the room'sstate_defaultas authority. In a room whose owner legitimately loweredstate_default(e.g. 0, letting members set topic/widgets) or raisedusers_default, any joined member satisfies this with NO real moderator role overm.room.power_levels.commit_linkat approval time re-checks only bans, never re-reading PL/membership, so transient authority (temporary promotion then demotion/kick before approval) still spawns the bridge.Fix (needs a call on the bar)
Require sender power >= the room's power_levels CHANGE power, or an explicit per-user
users[]entry aboveusers_default(not merelystate_default). Re-run the room-authority probe insidecommit_linkbefore writing tenants.toml. Note two-sided auth still requires Discord Manage-Server approval, which bounds the blast radius — hence MEDIUM.Severity MEDIUM.
Fixed + shipped in v0.3.0-alpha.20 (master
c92cfcc, deployed to prod 2026-07-11).require_room_authoritynow requires an explicit individual moderator grant — ausers[sender]power-level entry aboveusers_defaultAND >= 50 (Element Moderator) — instead of justsender_pl >= state_default. This closes both #79 finding-6 vectors: a loweredstate_defaultor a raisedusers_defaultcan no longer make every member look authorized. Authority is also re-checked at Discord-approval time (not just the probe) to catch a promote-then-demote TOCTOU. Verified: 7 unit tests (both attack vectors + floor + explicit-above-default), and the livemgmt_self_serve_linkscenario PASS (negative users refused, @nvbtest_mgr with an explicit PL-50 grant over users_default 0 accepted). README + config.example updated.