vpp icon indicating copy to clipboard operation
vpp copied to clipboard

[BUG] IKEv2: SIGSEGV in ip4_sas when resolving responder hostname on a system with no IPv4 addresses

Open HoneyBBQ opened this issue 1 week ago • 0 comments

Environment:

  • VPP Version: v25.10-release
  • OS: Ubuntu 24.04 (Docker Container)
  • Plugins: ikev2, dns, nat

Description: VPP crashes with SIGSEGV when calling ikev2_initiate_sa_init for a profile configured with a hostname as responder, if the VPP instance has no IPv4 addresses configured on any interface.

Steps to reproduce:

  1. Start VPP with dns and ikev2 plugins enabled.
  2. Create a loopback interface but do not assign any IP address:
    vppctl loopback create
    vppctl set int state loop0 up
    
  3. Configure an IKEv2 profile with a hostname responder:
    vppctl ikev2 profile add test
    vppctl ikev2 profile set test responder loop0 google.com
    
  4. Initiate the SA:
    vppctl ikev2 initiate sa-init test
    

Actual Results: VPP crashes immediately with the following stack trace:

#0  0x00007b623610624f ip4_sas + 0x2f from /lib/x86_64-linux-gnu/libvnet.so.25.10
#1  0x00007b61f48f6571 from /usr/lib/x86_64-linux-gnu/vpp_plugins/dns_plugin.so
#4  0x00007b61f48fc36a dns_resolve_name + 0x4a from /usr/lib/x86_64-linux-gnu/vpp_plugins/dns_plugin.so
#5  0x00007b61f46ea45c from /usr/lib/x86_64-linux-gnu/vpp_plugins/ikev2_plugin.so

Expected Results: VPP should return an error (e.g., VNET_API_ERROR_NO_SOURCE_ADDRESS) instead of crashing.

HoneyBBQ avatar Dec 24 '25 18:12 HoneyBBQ