Repository navigation
Reject invalid IDs during user resolution - #16444
Merged
Merged
Conversation
User resolution narrowed signed numeric requests and group-file IDs without checking their range. Invalid selected passwd records also fell back to default IDs. These paths could resolve an invalid request or account record to UID or GID 0. Return errors for negative, oversized, or reserved IDs, and propagate them through Lifecycle.StartContainer before creating credentials. Validate both request components before opening account files so a missing file cannot hide an invalid explicit group. Check selected passwd record structure and group record length before reading IDs. Preserve fallback for unknown names and missing files, textual UID matching, and the existing treatment of unrelated malformed records. Extend the VFS-backed resolver table to check these distinctions and the underlying syntax and range errors. Assisted-by: OpenAI Codex Auto-fixed-by: [🤖] @EtiennePerot COPYBARA_INTEGRATE_REVIEW=#15981 from tamird:user-id-resolution-bounds 4cbfbc9 PiperOrigin-RevId: 1007594591
copybara-service
Bot
force-pushed
the
test/cl1006610534
branch
from
October 26, 2026 22:23
2380869 to
18ba8a8
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.
Reject invalid IDs during user resolution
User resolution narrowed signed numeric requests and group-file IDs
without checking their range. Invalid selected passwd records also fell
back to default IDs. These paths could resolve an invalid request or
account record to UID or GID 0.
Return errors for negative, oversized, or reserved IDs, and propagate
them through Lifecycle.StartContainer before creating credentials.
Validate both request components before opening account files so a
missing file cannot hide an invalid explicit group. Check selected
passwd record structure and group record length before reading IDs.
Preserve fallback for unknown names and missing files, textual UID
matching, and the existing treatment of unrelated malformed records.
Extend the VFS-backed resolver table to check these distinctions and the
underlying syntax and range errors.
Assisted-by: OpenAI Codex
Auto-fixed-by: [🤖] @EtiennePerot
FUTURE_COPYBARA_INTEGRATE_REVIEW=#15981 from tamird:user-id-resolution-bounds 4cbfbc9