Bug 498832

Summary: bgpd crashes on as paths containing more 6 digit as numbers
Product: [Fedora] Fedora Reporter: Dušan Hokův <dusan>
Component: quaggaAssignee: Jiri Skala <jskala>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 10CC: aglotov, jskala
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-04 13:46:28 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 Dušan Hokův 2009-05-03 18:42:51 UTC
Description of problem:
bgpd crashes on as paths containing more 6 digit as numbers

Version-Release number of selected component (if applicable):
0.99.11

How reproducible:
use bgpd as border router

Steps to Reproduce:
1.run bgpd
2.import prefixes
3.
  
Actual results:
crash always

Expected results:
run

Additional info:
bug is also in quagga bugzilla:

http://bugzilla.quagga.net/show_bug.cgi?id=500

There is also patch:

--- quagga-0.99.11-orig/bgpd/bgp_aspath.c	2008-09-05 17:27:26.000000000 +0300
+++ quagga-0.99.11/bgpd/bgp_aspath.c	2009-05-03 19:06:55.000000000 +0300
@@ -549,7 +549,7 @@
    * With 32bit ASNs, this range will increase, but only worth changing
    * once there are significant numbers of ASN >= 100000
    */
-#define ASN_STR_LEN (5 + 1)
+#define ASN_STR_LEN (10 + 1)
   str_size = MAX (assegment_count_asns (seg, 0) * ASN_STR_LEN + 2 + 1,
                   ASPATH_STR_DEFAULT_LEN);
   str_buf = XMALLOC (MTYPE_AS_STR, str_size);

Comment 1 Jiri Skala 2009-05-05 14:38:24 UTC
The bug duplicates BZ #499033. There are remarks about side effects of this short hack (negative values). I don't see it fixed completely but the patch in the twins bug is a bit strange.

*** This bug has been marked as a duplicate of bug 499033 ***