Socket leak on each call to qemu_socket()
Bug #1504513 reported by
Mark Pizzolato
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Invalid
|
Undecided
|
Mark Pizzolato |
Bug Description
On any host platform where SOCK_CLOEXEC is defined (Linux at least), a socket is leaked on each call to qemu_socket() AND the socket returned hasn't been created with the desired SOCK_CLOEXEC attribute. The qemu_socket routine is:
Line 272 of util/osdep.c:
/*
* Opens a socket with FD_CLOEXEC set
*/
int qemu_socket(int domain, int type, int protocol)
{
int ret;
#ifdef SOCK_CLOEXEC
ret = socket(domain, type | SOCK_CLOEXEC, protocol);
if (ret != -1 || errno != EINVAL) {
return ret;
}
#endif
ret = socket(domain, type, protocol);
if (ret >= 0) {
}
return ret;
}
To post a comment you must log in.
I'm not sure that my original report was distributed to the folks who need to see this. My primary email address has a DKIM policy (DMARC) which says that all messages from my address are signed. I received various DMARC reports which said that the bug report sent as "From: <email address hidden>" were rejected. The bug report messages were reasonably sent with an SMTP envelope from of <email address hidden> and a "Sender: <email address hidden>". Hmm... Maybe 163.com is rewriting message headers. In any case, the message would have passed the DMARC check if my email address was in a "Reply-To: <email address hidden>" header (there was no Reply-To: header), and the "From:" header was a @nongnu.org address.
I have changed my account to use my users.sourcefor ge.com forwarding address and I'm now generating this comment so that hopefully, the whole message will be widely distributed with a from address which doesn't have the same DMARC policy.