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

Fix SIGSEGV when no best route is found. #702

Merged
merged 2 commits into from
Apr 16, 2021

Conversation

jjnicola
Copy link
Member

@jjnicola jjnicola commented Apr 13, 2021

What:
Fix SIGSEGV when no best route is found.

Why:
In some case there is no a best route, and no source route can be assigned.
This fix set source with the address in the first route found in the route table
or 0.0.0.0 in case an empty route table.

There is no issue with IPv6, since there is no IPv6 broadcast address.

How:
Set veth in a new namespace and run the following script (which sends to broadcast address).

sudo ip netns exec scan1 openvas-nasl -X -d -i /home/jnicola/install/var/lib/openvas/plugins/ -t 10.1.1.3 /home/jnicola/install/var/lib/openvas/plugins/gb_netgear_nsdp_detect.nasl --kb="keys/islocalnet=1"

Without the patch, the command above SIGSEGVs

Checklist:

@jjnicola jjnicola marked this pull request as ready for review April 13, 2021 15:11
In some case there is no a best route, and no source route can be assigned.
This fix set source with the address in the first route found in the route table
or 0.0.0.0 in case an empty route table.
@jjnicola jjnicola merged commit 10dcbd6 into greenbone:openvas-20.08 Apr 16, 2021
@jjnicola jjnicola deleted the namespace branch April 16, 2021 08:57
jjnicola added a commit that referenced this pull request Apr 16, 2021
Fix SIGSEGV when no best route is found. (backport #702)
jjnicola added a commit that referenced this pull request Apr 16, 2021
Fix SIGSEGV when no best route is found. (backport #702)
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.

2 participants