Pure-Python fallback of socket.socketpair() doesn’t authenticate peer connection
Python Software Foundation CPython
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Python Software Foundation CPython Windows |
| No fix yet |
Original description
The “socket” module provides a pure-Python fallback to the socket.socketpair() function for platforms that don’t support AF_UNIX, such as Windows. This pure-Python implementation uses AF_INET or AF_INET6 to create a local connected pair of sockets. The connection between the two sockets was not verified before passing the two sockets back to the user, which leaves the server socket vulnerable to a connection race from a malicious local peer.