-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
3
-
-
rhel-9
-
None
-
rhel-net-ovn
-
-
-
OVN FDP Sprint 14
-
1
This is tracking the upstream effort needed to deliver the solution to the bug described below.
Problem Description:
If there is a router with a policy that contains output_port only and no nexthop or nexthops then northd crashes.
Module libgcc_s.so.1 from deb gcc-14-14.2.0-4ubuntu2~24.04.amd64
Stack trace of thread 4130112:
#0 0x000079ba7dd9ad1c n/a (libc.so.6 + 0x19ad1c)
#1 0x0000569a80a770a2 build_route_policies (ovn-northd + 0x640a2)
#2 0x0000569a80a8335c en_route_policies_run (ovn-northd + 0x7035c)
#3 0x0000569a80aad0fe engine_recompute (ovn-northd + 0x9a0fe)
#4 0x0000569a80aadcd5 engine_run_node (ovn-northd + 0x9acd5)
#5 0x0000569a80a9dbe8 inc_proc_northd_run (ovn-northd + 0x8abe8)
#6 0x0000569a80a4bc5d main (ovn-northd + 0x38c5d)
#7 0x000079ba7dc2a1ca n/a (libc.so.6 + 0x2a1ca)
#8 0x000079ba7dc2a28b __libc_start_main (libc.so.6 + 0x2a28b)
#9 0x0000569a80a4cdb5 _start (ovn-northd + 0x39db5)
That is because the code assumes either nexthops or nexthop defined and then searches dots in its value
https://github.com/ovn-org/ovn/blob/main/northd/northd.c#L14745-L14766
with
bool is_ipv4 = strchr(nexthop, '.') ? true : false;
and `nexthop` is null at that point, which segfaults.
Impact Assessment: northd crashes fully
Software Versions: OVN master, commit 9ef23d8c48e670878f96104a1107330f032e8e33
Issue Type: Regression
Reproducibility: Every time the policy above is created
Reproduction Steps:
Create LR with policy with output_port only, for example
_uuid : 38891416-7999-46d3-b178-955578173c5f
action : reroute
bfd_sessions : []
chain : []
external_ids : {}
jump_chain : []
match : "inport==\"bgp-lrp-bgp-lr-efc1acec-4bfb-45eb-bf60-fb8fca5c9aa0-to-bgp-ls-efc1acec-4bfb-45eb-bf60-fb8fca5c9aa0-br-bgp-eth2\""
nexthop : []
nexthops : []
options : {}
output_port : 9351c7a7-172c-4ea0-9172-701718af792e
priority : 10