Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ip6 fixes #172

Merged
merged 3 commits into from
Feb 24, 2025
Merged

Ip6 fixes #172

merged 3 commits into from
Feb 24, 2025

Conversation

rjarry
Copy link
Collaborator

@rjarry rjarry commented Feb 20, 2025

No description provided.

Fix the following crash when running `show ip6 router-advert`:

ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f4fb3aba5b8
at pc 0x000000518eeb bp 0x7fff0de9b2b0 sp 0x7fff0de9b2a8

READ of size 8 at 0x7f4fb3aba5b8 thread T0
  #0 0x518eea in gr_vec_len ../main/gr_vec.h:35
  DPDK#1 0x5197f5 in iface_ra_show ../modules/ip6/control/router_advert.c:90
  DPDK#2 0x4050e3 in read_cb ../main/api.c:287
  ...
  DPDK#5 0x409566 in main ../main/main.c:210

The hoplist structure contains a gr_vec of nexthop objects.

Fixes: 8ed8b9d ("ip6: router advertisement configuration")
Signed-off-by: Robin Jarry <[email protected]>
grout# show ip6 router-advert
error: command failed: Bad message
grout# ^D

==174902==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 328 byte(s) in 1 object(s) allocated from:
    #0 0x7fe0ca6c2250 in calloc (/lib64/libasan.so.8+0xc2250)
    DPDK#1 0x7fe0cadef910 in scols_new_table (/lib64/libsmartcols.so.1+0x6910)
    DPDK#2 0x417d0f in ra_show ../modules/ip6/cli/router_advert.c:19
    DPDK#3 0x41e836 in exec_strvec ../cli/exec.c:72
    DPDK#4 0x41e982 in exec_line ../cli/exec.c:106
    DPDK#5 0x41f412 in interact ../cli/interact.c:119
    DPDK#6 0x4216db in main ../cli/main.c:167
    ...
    DPDK#9 0x4017f4 in _start (/root/grout/build/grcli+0x4017f4)

Only allocate the table if the GR_IP6_IFACE_RA_SHOW api call is
successful.

Fixes: 8ed8b9d ("ip6: router advertisement configuration")
Signed-off-by: Robin Jarry <[email protected]>
When receiving ICMPv6 echo request packets with a multicast destination
address, grout currently tries to reply with a multicast source address
which is not valid.

Use the link local address of the receiving interface as source address
instead.

Signed-off-by: Robin Jarry <[email protected]>
@rjarry rjarry merged commit 691babf into DPDK:main Feb 24, 2025
8 checks passed
@rjarry rjarry deleted the ip6-fixes branch February 24, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant