Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 1998 18:06:00 -0800 (PST)
From:      Bill Fenner <fenner@FreeBSD.ORG>
To:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG
Subject:   cvs commit: src/sys/netinet tcp_input.c
Message-ID:  <199801210206.SAA06196@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
fenner      1998/01/20 18:06:00 PST

  Modified files:
    sys/netinet          tcp_input.c 
  Log:
  A more complete fix for the "land" attack, removing the "quick fix" from
  rev 1.66.  This fix contains both belt and suspenders.
  
  Belt: ignore packets where src == dst and srcport == dstport in TCPS_LISTEN.
   These packets can only legitimately occur when connecting a socket to itself,
   which doesn't go through TCPS_LISTEN (it goes CLOSED->SYN_SENT->SYN_RCVD->
   ESTABLISHED).  This prevents the "standard" "land" attack, although doesn't
   prevent the multi-homed variation.
  
  Suspenders: send a RST in response to a SYN/ACK in SYN_RECEIVED state.
   The only packets we should get in SYN_RECEIVED are
   1. A retransmitted SYN, or
   2. An ack of our SYN/ACK.
   The "land" attack depends on us accepting our own SYN/ACK as an ACK;
   in SYN_RECEIVED state; this should prevent all "land" attacks.
  
  We also move up the sequence number check for the ACK in SYN_RECEIVED.
   This neither helps nor hurts with respect to the "land" attack, but
   puts more of the validation checking in one spot.
  
  PR:             kern/5103
  
  Revision  Changes    Path
  1.68      +25 -20    src/sys/netinet/tcp_input.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801210206.SAA06196>