[Qemu-devel] [PATCH] Fix configure test for PBKDF2 in nettle

2016-05-26 Thread Steven Luo
From: Steven Luo On my Debian jessie system, including nettle/pbkdf2.h does not cause NULL to be defined, which causes the test to fail to compile. Include stddef.h to bring in a definition of NULL. Cc: qemu-triv...@nongnu.org Cc: qemu-sta...@nongnu.org Signed-off-by: Steven Luo --- I suppose

[Qemu-devel] [PATCH v2 2/4] slirp: avoid use-after-free in slirp_pollfds_poll() if soread() returns an error

2016-04-06 Thread Steven Luo
From: Steven Luo Samuel Thibault pointed out that it's possible that slirp_pollfds_poll() will try to use a socket even after soread() returns an error, resulting in an use-after-free if the socket was removed while handling the error. Avoid this by refusing to continue to work with the s

[Qemu-devel] [PATCH v2 4/4] slirp: handle deferred ECONNREFUSED on non-blocking TCP sockets

2016-04-06 Thread Steven Luo
From: Steven Luo slirp currently only handles ECONNREFUSED in the case where connect() returns immediately with that error; since we use non-blocking sockets, most of the time we won't receive the error until we later try to read from the socket. Ensure that we deliver the appropriate R

[Qemu-devel] [PATCH v2 3/4] slirp: Propagate host TCP RST to the guest.

2016-04-06 Thread Steven Luo
From: Edgar E. Iglesias When the host aborts (RST) it's side of a TCP connection we need to propagate that RST to the guest. The current code can leave such guest connections dangling forever. Spotted by Jason Wessel. [ste...@steven676.net: coding style adjustments] Signed-off-by: Steve

[Qemu-devel] [PATCH v2 1/4] slirp: don't crash when tcp_sockclosed() is called with a NULL tp

2016-04-06 Thread Steven Luo
From: Steven Luo Signed-off-by: Steven Luo Reviewed-by: Edgar E. Iglesias --- v1->v2: * added Reviewed-by line slirp/tcp_subr.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index dbfd2c6..32ff452 100644 --- a/slirp/tcp_sub

[Qemu-devel] [PATCH v2 0/4] slirp: deliver received TCP RSTs to the guest

2016-04-06 Thread Steven Luo
Changes from v1: * added patch 2, a fix for an use-after-free exposed by this series (thanks Samuel Thibault) * incorporated Reviewed-by lines * attributed patches correctly -Steven Luo === QEMU's user-mode networking does not currently pass received TCP RSTs to guests, meaning

Re: [Qemu-devel] [PATCH 0/3] slirp: deliver received TCP RSTs to the guest

2016-04-06 Thread Steven Luo
e "might have been removed"? tcp_sockclosed() doesn't seem to call tcp_close() in every case, so we can get -1 from soread() without the socket being freed. > +continue; > +} > } > > /* -Steven Luo

Re: [Qemu-devel] [PATCH 2/3] slirp: Propagate host TCP RST to the guest.

2016-04-06 Thread Steven Luo
ver mangled the From addresses somewhere along the way -- I have it as edgar.igles...@axis.com in my local tree. My apologies -- I'll fix and resend later. -Steven Luo