-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
CoreRelated to urunc's internalsRelated to urunc's internalsbugSomething isn't workingSomething isn't working
Milestone
Description
Problem
urunc dereferences Spec.Linux and its sub-fields in several locations without nil checks:
- pkg/unikontainers/unikontainers.go:334 — u.Spec.Linux.RootfsPropagation
- pkg/unikontainers/unikontainers.go:457 — u.Spec.Linux.Namespaces
- pkg/unikontainers/unikontainers.go:639 — u.Spec.Linux.Namespaces
- pkg/unikontainers/unikontainers.go:828 — u.Spec.Linux (namespace config)
Per the OCI runtime-spec, the linux object is platform-specific and optional. A spec-compliant
config bundle may omit this field entirely, and the runtime should handle this gracefully rather
than panic.
Proposed Fix
Add defensive nil checks before dereferencing Spec.Linux, falling back to safe defaults and
skipping namespace operations when Linux config is absent.
This is defensive hardening and does not change behavior for any currently working workload.
Metadata
Metadata
Assignees
Labels
CoreRelated to urunc's internalsRelated to urunc's internalsbugSomething isn't workingSomething isn't working
Type
Projects
Status
No status