net: SIGSEGV in networkNumberAndMask #14131
Closed
Labels
Milestone
Comments
When would it be nil? It's an internal function. What is calling it with a nil value? Please provide a way to reproduce the problem. |
Thanks for your quick reply, I encountered this issue when testing docker on a device with multiple interfaces. Some of them where up but with no ip adresses. The call to networkNumberAndMask was made by the String function of ip.go. However, as this internal function is also used by Contains in ip.go, I think it should be fixed inside networkNumberAndMask. I have not trace where docker made the call to String as I thought that the problem was inside Go. If needed, I can send more traces. |
Sounds like some code forgot an error check. It's not valid to call String or Contains on a nil *IPNet. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In function networkNumberAndMask of src/net/ip.go, if n is NULL then n.IP.To4() will cause a segmentation fault.
n should be check against NULL at the start of this function.
The text was updated successfully, but these errors were encountered: