[dev] frr 8.4.x and 8.5 trigger assertion in bgpd/bgp_lcommunity.c:236

Kurt Jaeger frr-dev at opsec.eu
Tue Apr 18 13:24:11 UTC 2023


Hi!

> > This caused bgpd to terminate on several boxes this morning:
> > 
> > 2023/04/18 08:43:47 BGP: bgpd/bgp_lcommunity.c:236: set_lcommunity_string(): assertion ((unsigned int)len < str_buf_sz) failed
> > BGP: Received signal 6 at 1681800227 (si_addr 0x0); aborting...
> > 
> > OS: FreeBSD 13.1p3. frr was 8.4.x and 8.5. So someone is sending
> > strange things... ?
> > 
> > 7.5.1 is not affected...
> > 
> > Any ideas on how to avoid the assert ?
> 
> There's the lookup for community aliases added in that function:
> 
>                 const char *com2alias =
>                         translate_alias ? bgp_community2alias(lcsb) : lcsb;
>  
>                 len = strlcat(str_buf, com2alias, str_buf_sz);
> 
> and it seems to trigger the issue.

I created a patch for the FreeBSD port, see:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270910

-- 
pi at opsec.eu            +49 171 3101372                    Now what ?



More information about the dev mailing list