-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Workers bind to external network interface by default #11598
Comments
binding to a local port would prevent heterogeneous networks consisting of both local and remote clients so it is typically undesirable to bind to localhost. (it is possible to add/remove workers at runtime, so it's not possible to known ahead of time if all workers will be local) the kernel should fast-track the data as if it was declared using a unix domain socket, so there's no benefit there from performance. i'm not sure i understand the security argument. are you assuming some malicious process will discover the remote port and try to become part of the pool? that would be bad, but to solve that it sounds like the master process should be emitting a private token to stdin immediately upon startup of the client that would act as the shared secret for any client wishing to join the processor pool. |
Yes, my main concern here is security. I don't like the idea that julia is listening on an external network interface without me giving it an explicit instruction to do so.
My concern is that a malicious connection (which could originate, it seems, from another user on the same machine; from another person on the same network; or from somebody far away on the internet) could connect to the port a worker has binded to and gain control of it. Perhaps the method you suggest would work as a line of defense. The piece of code implementing this deserves to be audited pretty thoroughly though, as a single bug could lead to a compromised process. Even then, most people who think even passingly about security will prefer not to have julia workers listening on external ports (EDIT: unless, of course, they are running workers on multiple machines, in a controlled environment). Appropriate firewalling could mitigate the problem, but should not be relied on. As a tangent thought (ignoring the security concern for a moment, although that is my primary concern), I'm not sure why it binds to a specific network interface ( |
It is actually listening on all interfaces. The |
closed by #16292 |
When running
julia -p 2
, I was surprised to learn that the workers are told to bind to my external network interface.I would have hoped that a UNIX domain socket would be used if all the workers are on the local machine. (Failing that, binding to
localhost
would make a lot more sense, although this is still problematic from a security standpoint.)The text was updated successfully, but these errors were encountered: