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

mike tancsa mike at sentex.net
Thu Apr 20 13:30:14 UTC 2023


On 4/18/2023 5:28 AM, Kurt Jaeger wrote:
> 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 am seeing this crash as well. Sadly the patch in the freebsd pr does 
not seem to work around the issue.  If its an issue of communities, is 
there an easy way to strip out communities from peers for now ?

     ---Mike





More information about the dev mailing list