Bug 89512

Summary: Cipe chashes when it receives too small packets
Product: [Retired] Red Hat Linux Reporter: Bruno Negrao <bnegrao>
Component: cipeAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED CANTFIX QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: high    
Version: 9CC: alex-redbug, andrew, bnegrao, mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-02 18:50:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bruno Negrao 2003-04-23 17:42:33 UTC
Description of problem:
When connected using CIPE, this protocol will not recognize too small packets 
passing through the tunnel, it will act as the packets never existed!!
I found on the CIPE developer's site that this is really a bug on all versions 
of cipe previous to the 1.5.4.
Bellow, I cut and pasted the information I found on 
http://sites.inka.de/bigred/archive/cipe-l/2002-01/msg00011.html

--------------------------------------------------------------------
To:  cipe-l 
Subject:  BUG: crasher [IMPORTANT PATCH] 
From:  Olaf Titz &lt;olaf.de&gt; 
Date:  Mon, 07 Jan 2002 21:17:18 +0100 

--------------------------------------------------------------------------------

This must be an old problem, why was it never found? :-) To my
knowledge it exists in all published versions of CIPE. It causes a
crash when CIPE receives too small packets. Thanks to Larry McVoy for
alerting me to this bug.

The attached patch is from the CVS but applies cleanly to 1.5.2.

Olaf

Index: cipe/sock.c
===================================================================
RCS file: /home/olaf/common-home/CVSrepos/security/cipe-linux/cipe/sock.c,v
retrieving revision 1.36
diff -u -r1.36 sock.c
--- cipe/sock.c 2001/12/29 20:23:04     1.36
+++ cipe/sock.c 2002/01/06 18:28:56
@@ -199,6 +199,11 @@
        goto framerr;
     }
 #endif
+    if (length&lt;cipehdrlen+(c-&gt;sockshost?sizeof(struct sockshdr):0)) {
+        printk(KERN_INFO &quot;%s: got short packet from %s\n&quot;, c-&gt;dev-
&gt;name,
+               cipe_ntoa(saddr(skb)));
+       goto framerr;
+    }

     n=alloc_skb(skb-&gt;len, GFP_KERNEL);
     if (!n) {
@@ -390,10 +395,8 @@
     c-&gt;stat.rx_packets++;
     return NULL;

-#if 0
  framerr:
     ++c-&gt;stat.rx_frame_errors; /* slightly abuse this */
-#endif
  error:
     ++c-&gt;stat.rx_errors;
     if (n)

=== end of patch ===




Version-Release number of selected component (if applicable):
cipe-1.4.5-11

How reproducible:
Always

Steps to Reproduce:
To reproduce the problem, try a 'ping' with the '-s 0' option, this will 
produce icmp packets carrying 0 bytes of data, what generates a packet of only 
8 bytes (originated of the ICMP header).
This way:
ping -s 0 10.0.0.1 
Where 10.0.0.1 is the p-t-p addres of your peer machine.

Actual Results:  The ping will end with 100% of loss.
But if you simply try a 'ping 10.0.0.1' it will work. Why? Because the ping 
command sends by default a 56 bytes of data in each packet, which raises a 
packet with a total of 64 bytes.

Expected Results:  'ping -s 0' should work as it works for machines not using 
CIPE.

Additional info:

Of course when this problem happens on small ICMP packets this is not serious, 
but, when happening on small TCP packets(or other protocols), it could cause 
real problems.

Comment 1 alex kramarov 2003-05-25 10:30:20 UTC
I confirm that this is a serios problem on tcp connections - i waisted a full 
working day troubleshooting a problem that in the end was caused by this bug. 
Building the kernel module with the one compiled from cipe 1.5.4 solved the 
problem. 1.5.4 also works fine with 1.4.5 machines, so i don't see any 
compatibility issues. This is a real problem.

Comment 2 alex kramarov 2003-07-25 08:12:27 UTC
just saw that the new beta, severn still comes with cipe 1.4.5 ???

Come on, how hard is it to update ???

Hell, just use my modifications http://mail.incredimail.com/howto/lvs/install/

there is a mondified kernel that includes lvs and cipe 1.5.4

Comment 3 alex kramarov 2003-09-23 13:30:30 UTC
a link to fix the problem described above is here - this is one line patch, 
that is taken from the latest, 1.5.4 cipe version. please consider integrating 
it to main kernel, if you are not upgrading to cipe 1.5.4

http://www.nrh-up2date.org/howto/lvs/src/linux-2.4.20-cipe-shortpacket.patch



Comment 4 Andrew Meredith 2004-04-20 12:36:17 UTC
This is also an issue with the current (as of this note) version of
Fedora Core 1. The userspace daemon is still 1.4.5 and I regularly
suffer from tunnel crashes.

Comment 5 Bill Nottingham 2006-08-05 04:07:47 UTC
Red Hat apologizes that these issues have not been resolved yet. We do want to
make sure that no important bugs slip through the cracks.

Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
They are maintained by the Fedora Legacy project (http://www.fedoralegacy.org/)
for security updates only. If this is a security issue, please reassign to the
'Fedora Legacy' product in bugzilla. Please note that Legacy security update
support for these products will stop on December 31st, 2006.

If this is not a security issue, please check if this issue is still present
in a current Fedora Core release. If so, please change the product and version
to match, and check the box indicating that the requested information has been
provided.

If you are currently still running Red Hat Linux 7.3 or 9, please note that
Fedora Legacy security update support for these products will stop on December
31st, 2006. You are strongly advised to upgrade to a current Fedora Core release
or Red Hat Enterprise Linux or comparable. Some information on which option may
be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Any bug still open against Red Hat Linux 7.3 or 9 at the end of 2006 will be
closed 'CANTFIX'. Again, if this bug still exists in a current release, or is a
security issue, please change the product as necessary. We thank you for your
help, and apologize again that we haven't handled these issues to this point.


Comment 7 Bill Nottingham 2007-01-02 18:50:18 UTC
Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc.
f you are currently still running Red Hat Linux 7.3 or 9, you are strongly
advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux
or comparable. Some information on which option may be right for you is
available at http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.