You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name. #84031
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-03-09.14:48:23.277>created_at=<Date2020-03-04.16:12:51.698>labels= ['3.7', '3.8', 'type-bug', 'library', '3.9']
title='multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.'updated_at=<Date2020-03-09.14:48:23.277>user='https://bugs.python.org/nmichaels'
>>> from multiprocessing.connection import Listener
>>> listener = Listener('\0conntest', family='AF_UNIX')
>>> listener.close()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.6/multiprocessing/connection.py", line 466, in close
listener.close()
File "/usr/lib64/python3.6/multiprocessing/connection.py", line 604, in close
unlink()
File "/usr/lib64/python3.6/multiprocessing/util.py", line 186, in __call__
res = self._callback(*self._args, **self._kwargs)
ValueError: embedded null byte
Linux has a handy feature where if the first byte of a unix domain socket's name is the null character, it won't put it in the filesystem. The socket interface works fine with it, but when SocketListener is wrapped around a socket, it throws this exception.
Now that it's public... if you are explicitly asking multiprocessing to use Linux abstract sockets in your code you likely have a security problem: #97514
Activity
nmichaels commentedon Mar 4, 2020
Linux has a handy feature where if the first byte of a unix domain socket's name is the null character, it won't put it in the filesystem. The socket interface works fine with it, but when SocketListener is wrapped around a socket, it throws this exception.
pablogsal commentedon Mar 9, 2020
New changeset 6012f30 by Pablo Galindo in branch 'master':
bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866)
6012f30
pablogsal commentedon Mar 9, 2020
New changeset 2235e04 by Pablo Galindo in branch '3.7':
[3.7] bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866) (GH-18877)
2235e04
pablogsal commentedon Mar 9, 2020
New changeset 3ede1bc by Pablo Galindo in branch '3.8':
[3.8] bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866) (GH-18876)
3ede1bc
gpshead commentedon Oct 20, 2022
Now that it's public... if you are explicitly asking multiprocessing to use Linux abstract sockets in your code you likely have a security problem: #97514
gh-97514: Don't use Linux abstract sockets for multiprocessing (#98501)
pythongh-97514: Don't use Linux abstract sockets for multiprocessing (p…
pythongh-97514: Don't use Linux abstract sockets for multiprocessing (p…
pythongh-97514: Don't use Linux abstract sockets for multiprocessing (p…
pythongh-97514: Don't use Linux abstract sockets for multiprocessing (p…
[3.10] gh-97514: Don't use Linux abstract sockets for multiprocessing (…
[3.11] gh-97514: Don't use Linux abstract sockets for multiprocessing (…
[3.11] gh-97514: Don't use Linux abstract sockets for multiprocessing (…
[3.9] gh-97514: Don't use Linux abstract sockets for multiprocessing (G…
00391: Don't use Linux abstract sockets for multiprocessing