Skip to content

Added new option to restrict unsafe memory access#11

Open
chris-t-k wants to merge 1 commit intokhaleesicodes:mainfrom
chris-t-k:feature/controlAccessToUnsafe
Open

Added new option to restrict unsafe memory access#11
chris-t-k wants to merge 1 commit intokhaleesicodes:mainfrom
chris-t-k:feature/controlAccessToUnsafe

Conversation

@chris-t-k
Copy link
Copy Markdown
Contributor

@chris-t-k chris-t-k commented Jun 20, 2025

sun.misc.Unsafe can be used to bypass the sandbox. Matilda should control access to that class.

Alternative: Make sure Unsafe is disabled using -Dsun.misc.unsafe.memory.access=deny

@chris-t-k
Copy link
Copy Markdown
Contributor Author

chris-t-k commented Jun 20, 2025

The included test was my first approach to defeat the sandbox. It is not a matilda bug but a java exploit/backdoor to get full reflective access without the need to open a module. Credits for this approach go to Project Lombok.

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.

1 participant