Article View: news.software.nntp
Article #72035TCP RST security vs. consumer-grade firewalls / NATs
From: Andrew - Supernews
Date: Wed, 13 Jul 2005 19:09
Date: Wed, 13 Jul 2005 19:09
41 lines
2800 bytes
2800 bytes
We've run into the following case, which I've not managed to find any reference to in the usual places: 1) TCP connection is in ESTABLISHED state, with the server sending data in response to a client request (in our case it's NNTP, but that doesn't in itself matter) 2) User decides to abort the transfer, and hits "cancel" in his client program, which closes the socket 3) Client host sends FIN from the closed socket as normal. Since data is in-flight from the server, the next segment to arrive then provokes an RST, as normal. 4) Server is running a recent TCP stack, which (thanks to last year's hype) is doing strict checking of RST sequence numbers (checking for specific values and not just "in the window"). Accordingly the RST is ignored, the server's assumption being that further RSTs will be sent as the pipe empties, with the last one having the correct sequence number to kill the connection. 5) Client host is behind a firewall or NAT that naively assumes that one RST segment is enough, and which killed its state table entry on seeing the initial RST, and which drops unexpected incoming packets rather than answering with RST. Accordingly, there is no response to the further segments arriving from the server. 6) The connection is now hung until the server hits retransmit timeout. This presents a problem if the number of connections to a given client is being limited, as the server will not count the connection as being closed until several minutes have passed. Obviously the firewall is broken, and equally obviously this can be worked around by disabling strict checks on RST sequence number, but is this a known problem? And if so, does anyone have a guess at what proportion of firewalls are broken in this way? -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services
Technical Details
Message-ID:
<slrnddapnp.13l5.andrew+nonews@trinity.supernews.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.protocols.tcp-ip.mbox.zip!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeed.gamma.ru!Gamma.RU!Radio-MSU.net!mtu.ru!sn-xit-04!sn-xit-10!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <slrnddapnp.13l5.andrew+nonews@trinity.supernews.net> Subject: TCP RST security vs. consumer-grade firewalls / NATs Date: Wed, 13 Jul 2005 19:09:45 -0000 From: Andrew - Supernews <andrew+nonews@supernews.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.protocols.tcp-ip.mbox.zip!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeed.gamma.ru!Gamma.RU!Radio-MSU.net!mtu.ru!sn-xit-04!sn-xit-10!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Newsgroups: comp.protocols.tcp-ip,news.software.nntp Organization: http://www.supernews.com - all your nntp are belong to us Reply-To: andrew@supernews.com User-Agent: slrn/0.9.8.1 (FreeBSD) X-Complaints-To: abuse@supernews.com Lines: 40