Skip to content
WebsiteHosting.com

concept Linux & administration

Linux namespaces and isolation boundaries

Mount, PID, user, and network namespaces each isolate a different resource view. Compare two processes to see why a separate PID view says nothing by itself about networking, privileges, or resource limits.

Latest recorded source check · P0167

What it means

A Linux namespace gives a process a particular view of a kernel resource. Two processes can be in separate PID namespaces but share a network namespace: their views of process IDs are separate, but their view of network interfaces and ports is shared. The PID boundary alone tells you neither process's privileges.

Try it

Simulation: Compare the resource views of two hypothetical processes. Start with Required scenario evidence set to provided. Change only Network namespace from shared to separate. Watch which resource moves between the two result lists and which ones stay put.

Linux namespaces and isolation boundaries

Explain what mount, PID, user and network namespaces isolate separately

Simulation
Modeled outcome: Isolation

Each namespace isolates a particular resource view; security is not a single combined verdict.

Linux namespaces and isolation boundaries: synthetic scenario inputs
Replaces all inputs with the documented starting example and the indicated change. Reset restores the starting example.
Separate resource views versus shared resources

Resource views

  1. Mount pointsSeparate view
  2. Process IDsSeparate view
  3. User/group IDsShared view
  4. Network stackShared view

Not tested

  1. Syscall permissionsNot modeled
  2. Kernel securityNot established

These four namespace categories do not establish a complete security boundary or syscall filtering. A shared category does not become isolated merely because another one is separate.

Evaluated inputs

Required scenario evidence
provided
Mount namespace
separate
PID namespace
separate
User namespace
shared
Network namespace
shared

Four named resource views, symbolic shared/separate; no actual namespaces, mounts, capabilities or escape techniques.

About this model

The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.

Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.

Resource viewWhat the view describesAt the startAfter the network change
MountThe mount points a process seesSeparateSeparate
PIDThe process IDs a process seesSeparateSeparate
UserThe context for mapping user and group IDsSharedShared
NetworkNetwork resources such as interfaces and portsSharedSeparate

Initially, mount and PID are on the separate list; user and network are on the shared list. The simulation groups each resource according to its own namespace setting. After the change, network joins mount and PID on the separate list. User stays on the shared list because nothing about its setting changed. Neither result is a sandbox rating.

Now set Required scenario evidence to missing. Even with all four namespace choices visible, the result is unknown: those choices were not used to classify any views. An omitted or unsupported input is different: it produces an input error rather than an unknown result or a repeat of the last valid map. Reset restores all five starting choices. The table gives the worked comparison without interactive controls.

A separate view is not a permission

Consider the mount row. “Separate” means the processes have distinct views of mount points, not that each has a private copy of every file. A file can be present in both views. Whether a process can write it is a different question: you need to know how it is mounted and what permissions apply.

Read the network row the same way. Changing it answers “Do these processes share a network namespace?” It does not answer “Can one reach a particular service?” Likewise, the shared user row describes an ID mapping context; it does not say that the two processes run as the same user or have the same capabilities.

A useful contrast is to change only the network namespace to separate. The mount and PID views remain separate, while the user namespace remains shared. Neither the syscall filter nor the credentials of a process are inferred from this change. A review of a real isolation boundary must name the resource whose view is separate, then examine permissions and other controls independently.

In practice

When reviewing a workload described as “isolated,” first name the two processes being compared and the resource that matters. If the concern is shared networking, look for read-only evidence of their network namespace membership. Evidence that they are in different PID namespaces answers the wrong question.

Match the rest of the review to the decision. For a privileged operation, examine the applicable capabilities; for a system call restriction, examine the seccomp policy; for a resource limit, examine the relevant cgroup controls. None of the four namespace labels establishes those policies. Namespaces also operate within a shared kernel, and a list of separate views is not an assessment of that kernel's security.

If the necessary facts or the applicable system version are unknown, stop rather than change a real service on the strength of this example. The useful conclusion is specific: “These processes have separate views of this resource.” For a claim about access, limits, or safety, identify the additional evidence that claim needs.

Frequently asked questions

Editorial questions based on the listed sources and explicitly labeled local examples.

Does mount namespace isolate all files by itself?

It isolates mount views; permissions and mounts still matter.

Does user namespace change IDs?

It establishes a separate UID/GID mapping context. An identity in that context does not by itself establish the same privileges over resources outside it.

Does namespace replace seccomp?

No. Namespaces change the view of selected kernel resources; seccomp limits system calls. A process can have an isolated resource view and still make unwanted calls unless other appropriate controls restrict it. Neither alone establishes complete isolation.

Are cgroups namespaces?

No. Cgroups govern resource accounting and limits; a cgroup namespace changes the visible cgroup hierarchy. Neither one is a substitute for checking other namespace types or syscall restrictions.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. namespaces(7)

    DESCRIPTION (namespace resource views). Namespace membership isolates the view of a particular global kernel resource. It does not by itself establish complete isolation.

    Checked .

  2. seccomp(2)

    DESCRIPTION; SECCOMP_RET_LOG. LOG action allows syscall execution; logging may be administratively overridden. Filter action is not the final resource authorization.

    Checked .

Report an issue. Include the article URL and ID, not passwords or access keys.