Closed
Description
Describe the bug
- Did you check if this is a duplicate issue?
- Did you test it on the latest FRRouting/frr master branch?
To Reproduce
- git clone the frr git version with commit: a9b4458
- Compile it with
-fsanitize=addressflags. - Run bgpd with a simple bgpd.conf as follow:
/path/to/bgpd -f /path/to/bgpd.conf
! -*- bgp -*-
!
! BGPd sample configuratin file
!
!
hostname bgpd-S1
password en
enable password en
interface lo
ip address 127.0.0.1/32
router bgp 1
bgp router-id 172.17.0.3
address-family ipv4 unicast
network 172.17.0.0/24
exit-address-family
no bgp ebgp-requires-policy
no bgp network import-check
neighbor 172.17.0.1 remote-as 2
neighbor 172.17.0.1 ebgp-multihop
neighbor 172.17.0.1 next-hop-self
neighbor 172.17.0.1 timers 5 5
neighbor 172.17.0.1 extended-optional-parameters
log file /tmp/bgpd.log
!debug bgp as4
!debug bgp events
!debug bgp filters
!debug bgp fsm
debug bgp keepalives
debug bgp updates
debug bgp neighbor-events
!
log stdout
- Write a loop to sequencely send the packets below until it crash:
bgp_open = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00#\x01\x04\x00\x02\x00\x05\xac\x11\x00\x01\xff\xff\x00\x03\x00\x01\x00'
bgp_keepalive = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x13\x04'
bgp_notification = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x15\x04xv'

Because of the race condition, this might not be always cause the bgpd crash.
Expected behavior
The bgpd daemon program won't crash.
Screenshots
Versions
- OS Version: Ubuntu 20.04
- Kernel:
Linux 1738de574178 5.15.0-41-generic #44~20.04.1-Ubuntu
- FRR Version: git version with commit: a9b4458.
Additional context


