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

pimd: Prevent crash when receiving register message when the RP() is … #14294

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

donaldsharp
Copy link
Member

…unknown

When receiving a register message for a Group, that the group has no associated RP specified. Prevent a crash from happening.

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Aug 29, 2023

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-13870/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Failed

Debian 11 amd64 build: Failed (click for details) Debian 11 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-13870/artifact/DEB11AMD64/config.log/config.log.gz

Make failed for Debian 11 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-PULLREQ2-13870/artifact/DEB11AMD64/ErrorLog/log_make.txt)

In file included from ./lib/log.h:17,
pimd/pim_register.c: In function pim_register_recv:
./lib/zlog.h:109:20: error: unrecognized printf extension suffix [-Werror=format=]
./lib/zlog.h:113:26: note: in expansion of macro _zlog_ecref
pimd/pim_register.c:608:3: note: in expansion of macro zlog_warn
cc1: all warnings being treated as errors
make[1]: *** [Makefile:13314: pimd/pimd-pim_register.o] Error 1
In file included from ./lib/log.h:17,
pimd/pim_register.c: In function pim_register_recv:

Debian 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-PULLREQ2-13870/artifact/DEB11AMD64/config.status/config.status

Successful on other platforms/tests
  • Ubuntu 18.04 arm7 build
  • FreeBSD 11 amd64 build
  • CentOS 7 amd64 build
  • Ubuntu 18.04 amd64 build
  • Redhat 9 amd64 build
  • OpenBSD 7 amd64 build
  • FreeBSD 12 amd64 build
  • Redhat 8 amd64 build
  • Ubuntu 18.04 i386 build
  • Ubuntu 20.04 amd64 build
  • Ubuntu 22.04 amd64 build
  • Debian 9 amd64 build
  • Ubuntu 18.04 arm8 build
  • Ubuntu 18.04 ppc64le build
  • Debian 10 amd64 build

rp_addr = (RP(pim, sg.grp))->rpf_addr;
rpg = RP(pim, sg.grp);
if (!rpg) {
zlog_warn("%s: Received Register Message %pSG from %pPa on %s where the RP could not be looked up",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ups, %pPA

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what you are asking for here? Could you explain?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a small typo: %pPa, but should be %pPA?

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Aug 30, 2023

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-13870/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Failed

Debian 11 amd64 build: Failed (click for details) Debian 11 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-13870/artifact/DEB11AMD64/config.log/config.log.gz

Make failed for Debian 11 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-PULLREQ2-13870/artifact/DEB11AMD64/ErrorLog/log_make.txt)

In file included from ./lib/log.h:17,
pimd/pim_register.c: In function pim_register_recv:
./lib/zlog.h:109:20: error: unrecognized printf extension suffix [-Werror=format=]
./lib/zlog.h:113:26: note: in expansion of macro _zlog_ecref
pimd/pim_register.c:608:3: note: in expansion of macro zlog_warn
cc1: all warnings being treated as errors
make[1]: *** [Makefile:13314: pimd/pimd-pim_register.o] Error 1
In file included from ./lib/log.h:17,
pimd/pim_register.c: In function pim_register_recv:

Debian 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-PULLREQ2-13870/artifact/DEB11AMD64/config.status/config.status

Successful on other platforms/tests
  • Ubuntu 18.04 arm7 build
  • FreeBSD 11 amd64 build
  • CentOS 7 amd64 build
  • Ubuntu 18.04 amd64 build
  • Redhat 9 amd64 build
  • OpenBSD 7 amd64 build
  • FreeBSD 12 amd64 build
  • Redhat 8 amd64 build
  • Ubuntu 18.04 i386 build
  • Ubuntu 20.04 amd64 build
  • Ubuntu 22.04 amd64 build
  • Debian 9 amd64 build
  • Ubuntu 18.04 arm8 build
  • Ubuntu 18.04 ppc64le build
  • Debian 10 amd64 build

@donaldsharp
Copy link
Member Author

@Mergifyio backport stable/9.0 stable/8.5

@mergify
Copy link

mergify bot commented Aug 30, 2023

backport stable/9.0 stable/8.5

✅ Backports have been created

…unknown

When receiving a register message for a Group, that the group has no
associated RP specified.  Prevent a crash from happening.

Signed-off-by: Donald Sharp <[email protected]>
@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Aug 31, 2023

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

Test incomplete. See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-13913/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Incomplete

Topotests Ubuntu 18.04 amd64 part 9: Incomplete (check logs for details)
Addresssanitizer topotests part 6: Failed (click for details)
## Error: SEGV

### AddressSanitizer error in topotest `common_config.py`, test `check_router_status`, router `r4`

    ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55b4fbda2095 bp 0x7ffcba8d9af0 sp 0x7ffcba8d99a0 T0)
    ==31654==The signal is caused by a READ memory access.
    ==31654==Hint: address points to the zero page.
        #0 0x55b4fbda2094 in bgp_establish bgpd/bgp_fsm.c:2156
        #1 0x55b4fbda64e8 in bgp_event_update bgpd/bgp_fsm.c:2655
        #2 0x55b4fbdfb277 in bgp_process_packet bgpd/bgp_packet.c:3133
        #3 0x7f7a3e735b89 in event_call lib/event.c:1979
        #4 0x7f7a3e67a368 in frr_run lib/libfrr.c:1213
        #5 0x55b4fbcf37d1 in main bgpd/bgp_main.c:510
        #6 0x7f7a3d6bdc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
        #7 0x55b4fbcf1979 in _start (/usr/lib/frr/bgpd+0x2ce979)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV bgpd/bgp_fsm.c:2156 in bgp_establish

---------------
## Error: SEGV

### AddressSanitizer error in topotest `test_bgp_unique_rid.py`, test `teardown_module`, router `r4`

    ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55b4fbda2095 bp 0x7ffcba8d9af0 sp 0x7ffcba8d99a0 T0)
    ==31654==The signal is caused by a READ memory access.
    ==31654==Hint: address points to the zero page.
        #0 0x55b4fbda2094 in bgp_establish bgpd/bgp_fsm.c:2156
        #1 0x55b4fbda64e8 in bgp_event_update bgpd/bgp_fsm.c:2655
        #2 0x55b4fbdfb277 in bgp_process_packet bgpd/bgp_packet.c:3133
        #3 0x7f7a3e735b89 in event_call lib/event.c:1979
        #4 0x7f7a3e67a368 in frr_run lib/libfrr.c:1213
        #5 0x55b4fbcf37d1 in main bgpd/bgp_main.c:510
        #6 0x7f7a3d6bdc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
        #7 0x55b4fbcf1979 in _start (/usr/lib/frr/bgpd+0x2ce979)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV bgpd/bgp_fsm.c:2156 in bgp_establish

---------------

Addresssanitizer topotests part 6: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-13913/artifact/ASAN6/Topotest-Details/

Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-ASAN6-13913/test

Topology Tests failed for Addresssanitizer topotests part 6
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-13913/artifact/ASAN6/TopotestLogs/log_topotests.txt

Addresssanitizer topotests part 4: Incomplete (check logs for details)
Successful on other platforms/tests
  • Topotests Ubuntu 18.04 arm8 part 7
  • Addresssanitizer topotests part 9
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests debian 10 amd64 part 5
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 arm8 part 2
  • Topotests Ubuntu 18.04 i386 part 1
  • Addresssanitizer topotests part 7
  • Topotests Ubuntu 18.04 arm8 part 8
  • Topotests Ubuntu 18.04 i386 part 7
  • Topotests Ubuntu 18.04 i386 part 6
  • Topotests Ubuntu 18.04 amd64 part 5
  • Topotests Ubuntu 18.04 i386 part 2
  • Topotests Ubuntu 18.04 arm8 part 6
  • Topotests Ubuntu 18.04 amd64 part 2
  • Topotests Ubuntu 18.04 i386 part 3
  • Topotests Ubuntu 18.04 amd64 part 7
  • Topotests Ubuntu 18.04 i386 part 5
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests debian 10 amd64 part 8
  • Addresssanitizer topotests part 3
  • Topotests Ubuntu 18.04 i386 part 0
  • Topotests Ubuntu 18.04 arm8 part 4
  • Topotests debian 10 amd64 part 9
  • Topotests Ubuntu 18.04 amd64 part 4
  • Topotests Ubuntu 18.04 arm8 part 9
  • Addresssanitizer topotests part 2
  • CentOS 7 rpm pkg check
  • Topotests Ubuntu 18.04 amd64 part 0
  • Topotests Ubuntu 18.04 amd64 part 8
  • Topotests debian 10 amd64 part 7
  • Static analyzer (clang)
  • Topotests Ubuntu 18.04 arm8 part 0
  • Debian 9 deb pkg check
  • Addresssanitizer topotests part 8
  • Topotests debian 10 amd64 part 2
  • Debian 10 deb pkg check
  • Topotests Ubuntu 18.04 amd64 part 6
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests Ubuntu 18.04 amd64 part 1
  • Ubuntu 18.04 deb pkg check
  • Ubuntu 20.04 deb pkg check
  • Topotests debian 10 amd64 part 1
  • Addresssanitizer topotests part 5
  • Topotests Ubuntu 18.04 arm8 part 1
  • Topotests debian 10 amd64 part 6
  • Addresssanitizer topotests part 0
  • Topotests debian 10 amd64 part 4
  • Topotests debian 10 amd64 part 3
  • Addresssanitizer topotests part 1
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests Ubuntu 18.04 arm8 part 3
  • Topotests Ubuntu 18.04 i386 part 4

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-13913/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


CLANG Static Analyzer Summary

  • Github Pull Request 14294, comparing to Git base SHA c4f761d

No Changes in Static Analysis warnings compared to base

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-PULLREQ2-13913/artifact/shared/static_analysis/index.html

@ton31337 ton31337 merged commit 640b59a into FRRouting:master Sep 1, 2023
6 checks passed
Jafaral added a commit that referenced this pull request Sep 2, 2023
pimd: Prevent crash when receiving register message when the RP() is … (backport #14294)
Jafaral added a commit that referenced this pull request Sep 2, 2023
pimd: Prevent crash when receiving register message when the RP() is … (backport #14294)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants