Skip to content

slirp: deliver received TCP RSTs to the guest

Steven Luo qemu-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 0 repliesNew
  2. v13 patches 8 repliesSuperseded

Changes in v2 from the cover letter

* added patch 2, a fix for an use-after-free exposed by this series (thanks Samuel Thibault)
* incorporated Reviewed-by lines
* attributed patches correctly

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4slirp: don't crash when tcp_sockclosed() is called with a NULL tpslirp/tcp_subr.c+5 -20 replies
2/4slirp: avoid use-after-free in slirp_pollfds_poll() if soread() returns an errorslirp/slirp.c slirp/socket.c slirp/socket.h+23 -80 replies
3/4slirp: Propagate host TCP RST to the guest.slirp/socket.c+16 -10 replies
4/4slirp: handle deferred ECONNREFUSED on non-blocking TCP socketsslirp/socket.c slirp/tcp_input.c+7 -10 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchEdgar E. Iglesias
1/4R-b
2/4
3/4
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

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 that applications in guests hang if the remote server rejects their network connections. This is particularly noticeable when IPv6 is enabled, the guest is configured to prefer IPv6 and the remote server rejects IPv6 connections (segment-data.zqtk.net is one example), but the bug appears to be longstanding and affects TCP over IPv4 as well.

There are four short patches in this series. The first and second fix crashes which would be exposed by the rest of the series. The third, which fixes delivery of an RST interrupting an already-established TCP connection, was submitted by Edgar Iglesias in 2008 and appears to have been missed then. The last patch fixes the case where the remote end sends RST in reply to our SYN (rejects our incoming connection attempt).

Lightly tested on a Linux host with Linux and Windows 7 guests.

Edgar E. Iglesias (1):
slirp: Propagate host TCP RST to the guest.

Steven Luo (3):
slirp: don't crash when tcp_sockclosed() is called with a NULL tp
slirp: avoid use-after-free in slirp_pollfds_poll() if soread()
returns an error
slirp: handle deferred ECONNREFUSED on non-blocking TCP sockets

 slirp/slirp.c     | 12 +++++++++++-
 slirp/socket.c    | 34 +++++++++++++++++++++++++++-------
 slirp/socket.h    |  2 +-
 slirp/tcp_input.c |  6 ++++++
 slirp/tcp_subr.c  |  7 +++++--
 5 files changed, 50 insertions(+), 11 deletions(-)
Signature · 1 line
2.1.4