Skip to content

runsc/specutils: reject host UTS namespaces#12986

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test/cl903311202
Open

runsc/specutils: reject host UTS namespaces#12986
copybara-service[bot] wants to merge 1 commit intomasterfrom
test/cl903311202

Conversation

@copybara-service
Copy link
Copy Markdown

runsc/specutils: reject host UTS namespaces

gVisor virtualizes UTS state, so joining an existing host UTS namespace cannot provide the expected host namespace semantics. Reject OCI specs that set a UTS namespace path during spec validation, so --uts=host fails early with a clear error.

Supported behavior is unchanged for specs that create a new UTS namespace or omit the UTS namespace entry.

Fixes #7995

Tested:
make SHELL=/run/current-system/sw/bin/bash test TARGETS="//runsc/specutils:specutils_test"
FUTURE_COPYBARA_INTEGRATE_REVIEW=#12984 from gnix0:reject-host-uts-namespace d7bcbdd

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Apr 21, 2026
@copybara-service copybara-service Bot force-pushed the test/cl903311202 branch 2 times, most recently from c78dca1 to 2aa5093 Compare April 21, 2026 23:35
gVisor virtualizes UTS state, so joining an existing host UTS namespace cannot provide the expected host namespace semantics. Reject OCI specs that set a UTS namespace path during spec validation, so --uts=host fails early with a clear error.

Supported behavior is unchanged for specs that create a new UTS namespace or omit the UTS namespace entry.

Fixes #7995

Tested:
make SHELL=/run/current-system/sw/bin/bash test TARGETS="//runsc/specutils:specutils_test"
FUTURE_COPYBARA_INTEGRATE_REVIEW=#12984 from gnix0:reject-host-uts-namespace d7bcbdd
PiperOrigin-RevId: 903311202
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.

Unable to get hostname of host when running container with --uts=host

1 participant