Skip to content

netns.GetFromName rejects names that resolve outside /run/netns - #3019

Merged
Lior Lieberman (LiorLieberman) merged 1 commit into
agent-substrate:mainfrom
yufan-su:netns-getfromname-validate
Oct 21, 2026
Merged

Lior Lieberman (LiorLieberman) merged 1 commit into
agent-substrate:mainfrom
yufan-su:netns-getfromname-validate

Conversation

@yufan-su

@yufan-su Yufan Su (yufan-su) commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #3083

GetFromName passed the name straight to vishvananda/netns, which joins it onto /run/netns. A name like ../../proc/1/ns/net opened a namespace outside that directory.

CreateNamed and RemoveNamed already reject these names. The check moves into validateName, and GetFromName calls it too.

Today only tests call GetFromName, with names from nodepath.ActorNetNSName.

  • Tests pass
  • Docs updated

Comment thread internal/netns/netns.go
Merged via the queue into agent-substrate:main with commit 4dd025e Oct 21, 2026
15 checks passed
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.

[Low] Path Traversal in netns.GetFromName via Missing Input Validation (S2)

3 participants