Repository navigation
runtime: keep sandbox checker thread-local - #3452
Closed
adilalperenciftci wants to merge 1 commit into
Closed
adilalperenciftci wants to merge 1 commit into
adilalperenciftci wants to merge 1 commit into
Conversation
I reproduced one thread replacing another thread's in-process sandbox checker while their permission stacks stayed thread-local. Store the checker in TLS and let the preload bridge query it through a weak getter, which keeps standalone preload use valid. Add a synchronized two-thread regression test for policy isolation. Signed-off-by: Adil Alperen Çiftci <adilalperenciftci@users.noreply.github.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Contributor
Author
|
Closing as superseded by the current runtime sandbox architecture. Commit 6854baa moved grant levels into thread-local runtime state and added tests/regression/test_sandbox_thread_levels.ae; I verified that regression passes on current main. Rebasing this older checker-pointer implementation would duplicate the newer model. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I reproduced a mismatch between the thread-local generated permission stack and the process-global
_aether_sandbox_checker. A thread entering or leaving a sandbox block could replace or clear the checker used by another thread.AETHER_TLS_SHARED, aligning its lifetime with the generated sandbox state.aether_sandbox_get_checker()for the preload bridge.LD_PRELOADuse remains valid when no embedded runtime symbol is present.Verification
FAIL checker state crossed threads: main=1 worker=1PASS: sandbox checker state is thread-localmake check-changelogmake check-testsmake test: 634 passed, 0 failedSigned-off-by: Adil Alperen Çiftci adilalperenciftci@users.noreply.github.com