Skip to content

Fix RolesAuthority storage collision bug - #145

Merged
Maddiaa0 merged 2 commits into
mainfrom
fix/roles-collision
Sep 30, 2026
Merged

Maddiaa0 merged 2 commits into
mainfrom
fix/roles-collision

Conversation

@kadenzipfel

@kadenzipfel kadenzipfel commented Jul 2, 2026 •

Copy link
Copy Markdown
Collaborator

Previously, both GET_ROLE_FOR_CAPABILITY and IS_CAPABILITY_PUBLIC were deriving the same storage slot, keccak256(target‖sig), so they would overwrite each other. Fix is to use the previously unused IS_CAPABILITY_PUBLIC_LOCATION and GET_ROLES_WITH_CAPABILITY_LOCATION storage pointer constants

I could not find any production deployments containing this bug, so appears safe to disclose

@tom2o17

tom2o17 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

+1

@Maddiaa0
Maddiaa0 merged commit 64b6666 into main Sep 30, 2026
5 of 6 checks passed
Maddiaa0 added a commit that referenced this pull request Sep 30, 2026
Resolve the RolesAuthority conflict with #145. Keep this branch's
hash-once slot handling, but compute capability slots with their
storage locations via MAPPING_SLOT_2D, so isCapabilityPublic and
getRolesWithCapability stay in separate mappings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

3 participants