Thread View: news.software.nntp
2 messages
2 total messages
Started by Andrew - Supernews
Wed, 13 Jul 2005 19:09
TCP RST security vs. consumer-grade firewalls / NATs
Author: 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
Re: TCP RST security vs. consumer-grade firewalls / NATs
Author: Bill Davidsen
Date: Mon, 18 Jul 2005 15:03
Date: Mon, 18 Jul 2005 15:03
48 lines
3833 bytes
3833 bytes
Andrew - Supernews wrote: > 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? > We have seen a similar thing, but the cause seems to be different. What we see is that a socket is opened, and then closed *by the client* with a RST. This doesn't seem to be the same thing you describe, there is no valid data sent before the socket is closed. -- bill davidsen SBC/Prodigy Yorktown Heights NY data center http://newsgroups.news.prodigy.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads