Skip to content

increase minimum class region size to avoid OOB access under minimum class region size config#331

Open
rdevshp wants to merge 1 commit into
GrapheneOS:mainfrom
rdevshp:regions_size_oob_fix
Open

increase minimum class region size to avoid OOB access under minimum class region size config#331
rdevshp wants to merge 1 commit into
GrapheneOS:mainfrom
rdevshp:regions_size_oob_fix

Conversation

@rdevshp
Copy link
Copy Markdown
Contributor

@rdevshp rdevshp commented May 10, 2026

Under the current configuration limits, when CONFIG_CLASS_REGION_SIZE == 1048576, MAX_REGION_TABLE_SIZE can be smaller than INITIAL_REGION_TABLE_SIZE, which can cause OOB access. This PR proposes a fix for this issue.

@thestinger
Copy link
Copy Markdown
Member

It should be set to a higher value than the initial region table sized to some logical amount.

@rdevshp rdevshp force-pushed the regions_size_oob_fix branch from 8c00080 to 9ce3f61 Compare May 10, 2026 14:43
@rdevshp
Copy link
Copy Markdown
Contributor Author

rdevshp commented May 10, 2026

I've updated the static_assert to require CONFIG_CLASS_REGION_SIZE >= 25165824

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