Skip to content

Reject invalid IDs during user resolution - #16444

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test/cl1006610534
Oct 26, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test/cl1006610534

Conversation

@copybara-service

Copy link
Copy Markdown

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

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Oct 26, 2026
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
copybara-service Bot merged commit 18ba8a8 into master Oct 26, 2026
2 of 4 checks passed
@copybara-service
copybara-service Bot deleted the test/cl1006610534 branch October 26, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant