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 RPKI coverity scanner issues #15201

Merged
merged 5 commits into from
Jan 23, 2024

Conversation

louis-6wind
Copy link
Contributor

Fix 16 RPKI coverity scanner issues 1575911 to 1575926

@louis-6wind
Copy link
Contributor Author

louis-6wind commented Jan 23, 2024

Duplicate #15200

Fix potential NULL pointer in RPKI code. Coverity scanner issues: 1575911
1575913, 1575915, 1575917, 1575919 to 1575923, 1575925 and 1575926.

Fixes: 1420189 ("bgpd: add support of rpki in vrf configure context")
Signed-off-by: Louis Scalbert <[email protected]>
Fix deference before check coverity scanner issue 1575918 in
rpki_create_socket()

Fixes: a951752 ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <[email protected]>
Fix coverity scanner issue 1575912 where res pointer is supposed to
valid in:

> socket = vrf_socket(res->ai_family, ...)

but is checked for validity a few lines later.

Note that vrf_getaddrinfo returns an error code if getaddrinfo() fails
to allocate res and in this case, rpki_create_socket() returns.

Fixes: a951752 ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <[email protected]>
Fix memory leak in rpki_create_socket. Coverity scanner issue 1575914.

Fixes: a951752 ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <[email protected]>
Check (g|s)etsockopt returns in rpki_create_socket(). Coverity scanner
issues 1575916 and 1575924.

Fixes: a951752 ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <[email protected]>
@ton31337 ton31337 added this to the 10.0 milestone Jan 23, 2024
@ton31337 ton31337 merged commit a2ce7f1 into FRRouting:master Jan 23, 2024
9 checks passed
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