Skip to content

Merge External PR: Merge main-pr863 into main - #866

Merged
urunc-bot[bot] merged 3 commits into
mainfrom
main-pr863
Jul 30, 2026
Merged

Merge External PR: Merge main-pr863 into main#866
urunc-bot[bot] merged 3 commits into
mainfrom
main-pr863

Conversation

@urunc-bot

@urunc-bot urunc-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

This PR was automatically created by GitHub Actions to merge changes from main-pr863 into main.

Exec() decided whether to pivot_root or chroot by checking if findNS()
returned an error for the mount namespace. findNS() returns a non-nil
error both when the namespace type is missing from the spec entirely
and when it's present but not created yet, so the old check
(withPivot := err != nil) ended up pivoting even when the spec had no
mount namespace at all.

In that case FormatNsenterInfo() never sets CLONE_NEWNS, so no new
mount namespace gets created and the process stays in whatever mount
namespace the caller (normally urunc create) is running in, usually
the host's. pivot_root then runs against that namespace instead of an
isolated one.

Use the same ErrNotExistingNS check joinSandboxNetNs already relies on
for the network namespace: only pivot when findNS returns nil (joining
an existing namespace) or ErrNotExistingNS (entry present, about to be
created). Fall back to chroot when the namespace type is missing from
the spec entirely.

Fixes #861

PR: #863
Signed-off-by: Anand-240 <anandprakashsrivastava68@gmail.com>
Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
PR: #863
Signed-off-by: Anand-240 <anandprakashsrivastava68@gmail.com>
Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Use a dummy path instead of a real proc path in the "namespace type
missing from spec" case, merge the assert.False call and its message
onto one line, and drop the unnecessary file creation in the "existing
path" case since t.TempDir() already returns a real directory. Also
fixes the gosec G306 warning on the removed WriteFile call.

PR: #863
Signed-off-by: Anand-240 <anandprakashsrivastava68@gmail.com>
Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
@urunc-bot
urunc-bot Bot merged commit 96f992d into main Jul 30, 2026
@netlify

netlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit c95a697
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a6bade5b987b90008bdf194

@urunc-bot
urunc-bot Bot deleted the main-pr863 branch July 30, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant