-----BEGIN PGP SIGNED MESSAGE-----
===============================================================================
Security Advisory CERT-NL
===============================================================================
Author/Source : Egon Verharen/Nico de Koo Index : S-98-28
Distribution : World Page : 1
Classification: External Version: 2
Subject : TTCP vulnerability Date : 22-May-98
===============================================================================
By courtesy of FreeBSD, Inc. we received information on a vulnerability in TCP
Extensions for Transactions, or shortly T/TCP, where under certain
circumstances, complete connections can be spoofed.
CERT-NL recommends to follow the FreeBSD recommendation, which is to disable
all r-* services, or for FreeBSD 2.2.* and 3.0 systems install the appropriate
patches.
==============================================================================
FreeBSD-SA-98:03 Security Advisory
FreeBSD, Inc.
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.
==============================================================================
CERT-NL is the Computer Emergency Response Team for SURFnet customers.
SURFnet is the Dutch network for educational, research and related institutes.
CERT-NL is a member of the Forum of Incident Response and Security Teams
(FIRST).
All CERT-NL material is available under:
http://www.surfnet.nl/surfnet/security/cert-nl.html
ftp://ftp.surfnet.nl/surfnet/net-security
In case of computer or network security problems please contact your
local CERT/security-team or CERT-NL (if your institute is NOT a SURFnet
customer please address the appropriate (local) CERT/security-team).
CERT-NL is one/two hour(s) ahead of UTC (GMT) in winter/summer,
i.e. UTC+0100 in winter and UTC+0200 in summer (DST).
Email: cert-nl@surfnet.nl ATTENDED REGULARLY ALL DAYS
Phone: +31 302 305 305 BUSINESS HOURS ONLY
Fax: +31 302 305 329 BUSINESS HOURS ONLY
Snailmail: SURFnet bv
Attn. CERT-NL
P.O. Box 19035
NL - 3501 DA UTRECHT
The Netherlands
NOODGEVALLEN: 06 52 87 92 82 ALTIJD BEREIKBAAR
EMERGENCIES : +31 6 52 87 92 82 ATTENDED AT ALL TIMES
CERT-NL'S EMERGENCY PHONENUMBER IS ONLY TO BE USED IN CASE OF EMERGENCIES:
THE SURFNET HELPDESK OPERATING THE EMERGENCY NUMBER HAS A *FIXED*
PROCEDURE FOR DEALING WITH YOUR ALERT AND WILL IN REGULAR CASES RELAY IT
TO CERT-NL IN AN APPROPRIATE MANNER. CERT-NL WILL THEN CONTACT YOU.
==============================================================================
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: cp850
iQCVAwUBNWU2m1pSTqmIRWKVAQGhvAQAsf0E4x8UINS1SOHgfcS7pLY+3AWjvdNa
1BCAfBmzYhNrwVTfCdPoawNX5dMz1GQi/75Mmshu0VCObLr83qDX3T1E3qtgnTSh
u8+Q1BbHNCt4JxyD9rDCwsgA/+oJL0Is670VowbwFuZ8rYorNLu4u5ZQ4xVpo0Z5
TQrsmBDy3iQ=
=KDxz
-----END PGP SIGNATURE-----