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

newChanneler: unsafe generation of inproc address #252

Open
cyrilleverrier opened this issue Feb 22, 2019 · 0 comments
Open

newChanneler: unsafe generation of inproc address #252

cyrilleverrier opened this issue Feb 22, 2019 · 0 comments

Comments

@cyrilleverrier
Copy link
Contributor

func newChanneler(sockType int, endpoints string, subscribe []string, options []SockOption) *Channeler {
...
	c := &Channeler{
		id:          rand.Int63(),
...
	}
	c.commandAddr = fmt.Sprintf("inproc://actorcontrol%d", c.id)
	c.proxyAddr = fmt.Sprintf("inproc://proxy%d", c.id)
...
}

If very unlucky, two different instances of Channeler may have the exact same internal inproc address.
I would suggest to get a new c.id from an uuid string instead of rand.Int63() integer

cyrilleverrier added a commit to cyrilleverrier/goczmq that referenced this issue Feb 22, 2019
see zeromq#252

Use unique ids returned by czmq library instead of random numbers
to build unique inproc addresses in function newChanneler
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

No branches or pull requests

1 participant