libnl icon indicating copy to clipboard operation
libnl copied to clipboard

route/link: prevent segfault in af_request_type()

Open TarEnethil opened this issue 3 years ago • 0 comments

ac_request_type() in route/link.c will segfault if the function pointer ops->ao_override_rtm has not been initialized for the given af_type parameter.

The bug was found while trying to call rtnl_link_change() for a link with family type AF_INET6. It seems this bug was introduced in 3c427d0.

Fix: check that ao_override_rtm is a valid pointer before calling it.

TarEnethil avatar Oct 17 '22 14:10 TarEnethil