Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syscall: NetlinkRIB creates AF_NETLINK socket without SOCK_CLOEXEC #36053

Closed
lmb opened this issue Dec 9, 2019 · 2 comments
Closed

syscall: NetlinkRIB creates AF_NETLINK socket without SOCK_CLOEXEC #36053

lmb opened this issue Dec 9, 2019 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@lmb
Copy link
Contributor

lmb commented Dec 9, 2019

syscall.NetlinkRIB (which is used by net.InterfaceByName, etc.) creates an AF_NETLINK socket without setting SOCK_CLOEXEC. This means fork / exec will leak this socket to child processes.

LsfSocket and SetLsfPromisc are also affected by this, but are marked as deprecated.

What version of Go are you using (go version)?

$ go version
go version go1.13.3 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Linux

@gopherbot
Copy link

Change https://golang.org/cl/210517 mentions this issue: syscall: use SOCK_CLOEXEC when creating sockets

@toothrot toothrot added this to the Backlog milestone Dec 9, 2019
@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 9, 2019
@toothrot
Copy link
Contributor

toothrot commented Dec 9, 2019

/cc @ianlancetaylor @bradfitz

@golang golang locked and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants