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

bgpd: fix crash when polling bgp4v2PathAttrTable #17245

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

fdumontet6WIND
Copy link
Contributor

we have

(gdb) p *path->attr->aspath
$1 = {refcnt = 3, segments = 0x0, json = 0x0, str = 0x55723d0b7470 "", str_len = 0, asnotation = ASNOTATION_PLAIN}

It looks like this aspath is empty, resulting in a size 0 and NULL pointer for path->attr->aspath->segments which leads to the SIGSEGV

fixe: return 0 when segments is null.

we have

(gdb) p *path->attr->aspath
$1 = {refcnt = 3, segments = 0x0, json = 0x0, str = 0x55723d0b7470 "", str_len = 0, asnotation = ASNOTATION_PLAIN}

It looks like this aspath is empty, resulting in a size 0 and NULL pointer for path->attr->aspath->segments which leads to the SIGSEGV

fixe: return 0 when segments is null.

Signed-off-by: Francois Dumontet <[email protected]>
@fdumontet6WIND
Copy link
Contributor Author

not linked with that fix
ci:rerun

@ton31337 ton31337 added this to the 10.2 milestone Oct 28, 2024
@ton31337
Copy link
Member

Is this happening for iBGP stuff?

@ton31337
Copy link
Member

@Mergifyio backport dev/10.2 stable/10.1 stable/10.0 stable/9.1 stable/9.0

Copy link

mergify bot commented Oct 28, 2024

backport dev/10.2 stable/10.1 stable/10.0 stable/9.1 stable/9.0

✅ Backports have been created

@ton31337 ton31337 merged commit e42dd44 into FRRouting:master Oct 29, 2024
11 checks passed
riw777 added a commit that referenced this pull request Oct 29, 2024
bgpd:  fix crash when polling bgp4v2PathAttrTable (backport #17245)
riw777 added a commit that referenced this pull request Oct 29, 2024
bgpd:  fix crash when polling bgp4v2PathAttrTable (backport #17245)
riw777 added a commit that referenced this pull request Oct 29, 2024
bgpd:  fix crash when polling bgp4v2PathAttrTable (backport #17245)
riw777 added a commit that referenced this pull request Oct 29, 2024
bgpd:  fix crash when polling bgp4v2PathAttrTable (backport #17245)
riw777 added a commit that referenced this pull request Oct 29, 2024
bgpd:  fix crash when polling bgp4v2PathAttrTable (backport #17245)
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.

2 participants