-----BEGIN PGP SIGNED MESSAGE-----

===========================================================================
              AUSCERT External Security Bulletin Redistribution
                                      
                                      
   ESB-98.075 -- REVISED FreeBSD Security Advisory - FreeBSD-SA-98:03.ttcp
                            Vulnerability in ttcp
                                19th May 1998

===========================================================================

The FreeBSD Security Team has released the following advisory concerning a 
vulnerability in an extension to TCP called "TCP Extensions for Transactions".  

The following security bulletin is provided as a service to AusCERT's
members.  As AusCERT did not write this document, AusCERT has had no
control over its content.  As such, the decision to use any or all of this
information is the responsibility of each user or organisation, and should
be done so in accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It will
not be updated when the original bulletin is.  If downloading at a later
date, it is recommended that the bulletin is retrieved from the original
authors to ensure that the information is still current.

Contact information for FreeBSD is included in the Security Bulletin below.  
If you have any questions or need further information, please contact them 
directly.

Previous advisories and external security bulletins can be retrieved from:

	http://www.auscert.org.au/Information/advisories.html

If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security
Teams).

Internet Email: auscert@auscert.org.au
Facsimile:	(07) 3365 7031
Telephone:	(07) 3365 4417 (International: +61 7 3365 4417)
		AusCERT personnel answer during Queensland business hours
		which are GMT+10:00 (AEST).
		On call after hours for emergencies.


- --------------------------BEGIN INCLUDED TEXT--------------------

- -----BEGIN PGP SIGNED MESSAGE-----

WARNING: The patch given in the original advisory had an error. You should
apply the patch in this advisory. In order to do so, you should have the
original file. If you do no longer have the original, look at
	ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-98:03/ttcp.orig
It contains the original patch. You should then apply it first using patch
with the -R option.
We're sorry for any inconvenience this may cause.

This advisory also contains a valid patch for FreeBSD 2.1.* versions.

=============================================================================
FreeBSD-SA-98:03                                            Security Advisory
                                                                FreeBSD, Inc.

Topic:          Problems with TTCP

Category:       core
Module:         kernel
Announced:      1998-05-14, revised at 1998-05-18
Affects:        FreeBSD 2.1.*
		FreeBSD 2.2.*,
		FreeBSD-2.2-stable before 1998/05/14 and
		FreeBSD-3.0-current before 1998/05/05 suffer from this problem.
Corrected:      FreeBSD-3.0-current as of 1998/05/14
		FreeBSD-2.2-stable as of 1998/05/05
		FreeBSD-2.1-stable as of 1998/05/18
FreeBSD only:   No. Any other system incorporating TTCP extentions may be
                affected.

Patches:        ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-98:03/

I.   Background    


     RFC 1644 provides an extension to TCP called TCP Extensions for
     Transactions, or shortly T/TCP. It provides a way of bypassing
     the standard three-way handshake found in TCP, thus speeding up
     transactions.
     T/TCP has been incorporated in FreeBSD since FreeBSD 2.0.5.

II.  Problem Description

     An accelerated open is initiated by a client by sending a new
     TCP option, called CC, to the server.  The kernel keeps a
     special cache for each host it communicated with, among others
     containing the value of the last CC option used by the client.
     A new accelerated open is allowed when the CC sent is larger
     than the one in the per-host cache. Thus one can spoof complete
     connections.
     
III. Impact
     
     The hole can be used to obtain unauthorized acces to the system
     by spoofing connections to the r*-services. This can only be
     done in the case where an .rhost file and/or a host.equiv file
     is used as the sole method of authentication.

IV.  Workaround

     Disable all r-* services. Note that setting the kernel variable
     net.inet.tcp.rfc1644 to 0 does not solve the problem. This
     variable controls whether the system will initiate rfc1644
     based connections and does not affect the ability to receive
     such connections.

V.   Solution


     Apply the following patch, rebuild your kernel, install it
     and reboot your system. The patch is valid for 2.1.* systems,
     for 2.1-stable, for 2.2.* systems, for 2.2-stable and for 3.0-current.

     The patch below can be found on
	ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-98:03/

   
  Index: tcp_input.c
  ===================================================================
  RCS file: /home/ncvs/src/sys/netinet/tcp_input.c,v
  retrieving revision 1.74
  retrieving revision 1.77
  diff -u -r1.74 -r1.77
  --- tcp_input.c	1998/04/24 10:08:57	1.74
  +++ tcp_input.c	1998/05/18 17:11:24	1.77
  @@ -680,7 +680,9 @@
   		 * - otherwise do a normal 3-way handshake.
   		 */
   		if ((to.to_flag & TOF_CC) != 0) {
  -		    if (taop->tao_cc != 0 && CC_GT(to.to_cc, taop->tao_cc)) {
  +		    if (((tp->t_flags & TF_NOPUSH) != 0) &&
  +			taop->tao_cc != 0 && CC_GT(to.to_cc, taop->tao_cc)) {
  +
   			taop->tao_cc = to.to_cc;
   			tp->t_state = TCPS_ESTABLISHED;
   
    
    
=============================================================================
FreeBSD, Inc.

Web Site:                       http://www.freebsd.org/
Confidential contacts:          security-officer@freebsd.org
Security notifications:         security-notifications@freebsd.org
Security public discussion:     freebsd-security@freebsd.org
PGP Key:                ftp://ftp.freebsd.org/pub/FreeBSD/CERT/public_key.asc

Notice: Any patches in this document may not apply cleanly due to
        modifications caused by digital signature or mailer software.
        Please reference the URL listed at the top of this document
        for original copies of all patches if necessary.
=========================================================================

- -----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBNWBwolUuHi5z0oilAQFXGwP9FhHKXkdktCGBQ3cfP4pHBmDHGFPwFL/E
zcF05EFSxKR8Fw62b9zQw9vws1FN9L0ZXJjxVAFx7umSYnYqPrxFBgzzLs1Brfbh
G4c+br73C9RsN6yyTo6Am7TxBiCFtRfneS91jZQGpNfZcFWx84oy5hhmTLXaaJK7
qIdrquhtTSo=
=qxDF
- -----END PGP SIGNATURE-----

- --------------------------END INCLUDED TEXT--------------------


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key

iQCVAwUBNWWV8ih9+71yA2DNAQHSjgP+KCo+d2Ns989xXZBmUgaZAC5lNMXw3T7a
0tE+rhTkCnA7/MUvEO/YmCS5JIA8p/GJywoat7GiGUbp7gMzvNmZV7kZJ585i1JL
151fOlGJin3jFlCSOSCtj9yuQ/tZnCbZ+pjaa2mkZ8e5SatXDFMS6aJnL771GbyT
/m77FA8JdG4=
=7vo7
-----END PGP SIGNATURE-----