David Watson added the comment:

In this test (and nearby ones), the receiver provides too little space to 
receive the file descriptors that are sent, so that the control message has to 
be truncated if it is to be received at all.  The warning may indicate that the 
cmsghdr struct received still claims that the message contains the full amount 
of data (so that socket.recvmsg() would overrun the buffer if it actually 
believed the cmsghdr).

With that in mind, you might want to check whether file descriptors that don't 
fit are still received (say the sender sends three file descriptors when the 
receiver only asks for two, and the receiver gets a control message saying it 
now has descriptors on numbers 3 and 4, but it also gets a file descriptor on 
number 5 which it isn't told about).  If they are, it's a kernel bug which 
could be used for denial of service by exhausting the receiving process' quota 
of file descriptors (and the warning would probably go away if it were fixed).

----------
nosy: +baikie

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23828>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to