Preserve app ownership across WireGuard policy reloads - #933
Merged
Conversation
Retain bounded numeric owner state independently of route and blocking verdict generations. Revalidate policy against the original connection owner, reject ambiguous uncached established UID zero, and resolve fresh SYN tuples anew. Keep cache resets atomic and preserve the established route fast path. Add production-bound attribution, root UID, tuple reuse, expiry, collision and bridge-call regressions.
kasnder
force-pushed
the
codex/fix-wg-flow-owner
branch
from
September 9, 2026 07:43
e1293c6 to
7390ddf
Compare
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.
WireGuard policy reloads recheck the owner of established TCP connections. Android can return UID 0 for a closing connection that previously belonged to an ordinary app, causing its tracker activity to appear as “Unidentified app (UID 0)”. Device logs confirmed the same connection changing from Play Store UID 10276 to UID 0 after a reload.
Retain numeric TCP ownership in a bounded cache independent of route and blocking-policy generations. Refreshes still apply current routing and blocking decisions; fresh SYNs discard the previous owner. Uncached established connections with ambiguous UID 0 remain unresolved and fail closed. Atomic cache invalidation avoids a lifecycle race, and cached packets retain the existing route fast path.
Validation:
assembleGithubDebugpasses with all four native ABIs packaged.Final device execution and installation remain unverified because the Pixel disconnected. Existing timeline records are not rewritten.