Re: dunno understand FIN_WAIT1

From: Manas Garg (mls@chakpak.net)
Date: 08/23/01


Date: Thu, 23 Aug 2001 11:40:20 +0530
From: Manas Garg <mls@chakpak.net>
To: focus-linux@lists.securityfocus.com
Subject: Re: dunno understand FIN_WAIT1
Message-ID: <20010823114020.B29267@cygsoft.com>

On Tue Aug 21, 2001 at 11:58:26AM +0200, vogt@hansenet.com wrote:
> > tcp 0 469 212.68.212.198:www 212.156.70.158:4690
> > FIN_WAIT1 -
>
> TCP does a 3-way handshake for CLOSING a connection, too. that is FIN_WAIT.
> it basically means "we're in the process of closing this connection".
> sometimes, it never makes it and waits for the usual timeout.

TCP does a 4-way (and not 3-way) handshake while closing a connection.
A connection gets into FIN_WAIT_1 state when the application has called closed
on the socket. It will hang in FIN_WAIT_1 state if the application had written
some data to the socket before calling close and that data is still lying in
the kernel send buffers (i.e. it's yet to be transferred to the other party).

There is no timeout associated with this state. So, if the data in send buffers
cannot be transferred, this TCP connection will hang here unless the other
party sends a FIN.

One can look at
        http://www.internet2.edu/~shalunov/netkill/

and
        http://cert.uni-stuttgart.de/archive/bugtraq/2001/07/msg00544.html

for some discussion on this.

//manas



Relevant Pages

  • [Full-disclosure] Cisco PIX TCP Connection Prevention
    ... Cisco PIX TCP ... Connection Prevention, posted on November 22, 2005. ... By sending a TCP SYN packet with an incorrect checksum through a PIX ...
    (Full-Disclosure)
  • [Full-disclosure] Cisco PIX TCP Connection Prevention
    ... Cisco PIX TCP ... Connection Prevention, posted on November 22, 2005. ... By sending a TCP SYN packet with an incorrect checksum through a PIX ...
    (Full-Disclosure)
  • [NEWS] Cisco PIX TCP Connection DoS
    ... Get your security news from a reliable source. ... By crafting a special TCP packet and sending it to a vulnerable Cisco PIX, ... embryonic connection open until the embryonic connection timeout which is ...
    (Securiteam)
  • FreeBSD Security Advisory FreeBSD-SA-01:39.tcp-isn
    ... TCP network connections use an initial sequence number as part of the ... incoming connection is being established, ... Systems running insecure protocols which blindly trust a TCP ... requiring other authentication of the originator are vulnerable to ...
    (FreeBSD-Security)
  • Re: Firewall vs. IPS - Differences now (ISS, Intrushield 2.1?)
    ... If we expire a connection too early, ... The way we solved this at NFR is to never expire idle TCP states. ... For example the timeout for the SYN|ACK may have been ...
    (Focus-IDS)