fix use-after-free in local printing if dumping after flushing interface.#124
fix use-after-free in local printing if dumping after flushing interface.#124tinselcity wants to merge 1 commit intojech:masterfrom
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: