-
Notifications
You must be signed in to change notification settings - Fork 98
fix use-after-free in local printing if dumping after flushing interface. #124
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
base: master
Are you sure you want to change the base?
fix use-after-free in local printing if dumping after flushing interface. #124
Conversation
|
Good catch, thanks. I don't think we should be setting neigh->ifp to NULL, though, we should be flushing all neighbours that appear over that interface, i.e. we should be calling flush_neighbour on all such neighbours. See the functions flush_neighbour and flush_neighbour_routes, we already do that when flushing a neighbour. I also don't think it should happen in if_updown, it should happen in flush_interface. |
Thanks for the suggestions! I've updated the By the way, are you interested in a PR to add support for IPv4 multicast (in the The PR is a bit chunky though since it required changes in many places to use IPv4/IPv6 agnostic storage (eg Can folks let me know if they're interested and I'll put up the PR for review? Here's a brief overview of the work.
""" |
|
Looks good. Could you please squash your commits? |
… flushing interface. updating comment. flushing neighbours associated with flushed interface. flushing neighbours associated with flushed interface.
30d4500 to
6c654ad
Compare
|
Done -Rebased into a single commit. Any interest in the IPv4 multicast support?
|
No, we're not going to implement that. Babel was originally defined to run over either IPv6 or IPv4. It was later decided that in order to avoid fragmenting the community, it is better to run Babel over IPv6 only. All the more so since running over IPv6 has a number of advantages, such as stable neighbour identifiers (IPv6 link-locals are more stable than IPv4 addresses), and v4-via-v6. |
Got it thanks! Appreciate the review! |
What
flush_interfacefunction.Steps to reproduce
start
babeld(can run with asan enabled -see diff)running
add interface
wait for neighbor babeld to peer
babeldmonitoroutputflush interface and dump state
Got SIGABRT (asan backtrace)
Patch prevents use-after-free by: