-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Milestone
Description
Description
When someone is using libcontainer to start and kill containers from a long lived process (i.e. the same process creates and removes the container), initProcess.wait method is used, which has a kludge to work around killing containers that do not have their own PID namespace.
The code that checks for own PID namespace is not entirely correct. To be exact, it does not set sharePidns flag when the host/caller PID namespace is implicitly used. As a result, the above mentioned kludge does not work.
Here's the incorrect code:
runc/libcontainer/container_linux.go
Lines 536 to 542 in 2685116
| nsMaps := make(map[configs.NamespaceType]string) | |
| for _, ns := range c.config.Namespaces { | |
| if ns.Path != "" { | |
| nsMaps[ns.Type] = ns.Path | |
| } | |
| } | |
| _, sharePidns := nsMaps[configs.NEWPID] |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels