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
Milestone

Comments

@lmb
Copy link
Contributor

@lmb 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

@gopherbot gopherbot commented Dec 9, 2019

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
Copy link
Contributor

@toothrot toothrot commented Dec 9, 2019

@gopherbot gopherbot closed this in 9c8c27a Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.