commit | d956f325dd4eca712b16fd0df1529c1867ceaab4 | [log] [tgz] |
---|---|---|
author | Brian Norris <briannorris@chromium.org> | Thu Aug 20 02:09:35 2020 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Aug 24 19:09:29 2020 |
tree | 0406e55a76c2afc3942a37c110ad9077087d18bd | |
parent | cd3a7437bc00ad176e14e8237da67c45fe791848 [diff] |
FROMLIST: D-Bus: share 'remove all networks' with CLI The D-Bus implementation of RemoveAllNetworks differs wildly from the CLI implementation. Let's share the implementations. This resolves use-after-free bugs I noticed, where we continue to use the 'wpa_s->current_ssid' wpa_ssid object after freeing it, because we didn't bother to disconnect from (and set to NULL) current_ssid before freeing it. Signed-off-by: Brian Norris <briannorris@chromium.org> (am from https://patchwork.ozlabs.org/patch/1348134/) (also found at https://marc.info/?i=20200820020935.954467-2-briannorris@chromium.org) BUG=b:164231396 TEST=`tast run -var network.HostapHwsim.runArgs=dbus_remove_connected localhost:9222 network.HostapHwsim.full` (requires additional dbus- test support) -- especially with ASAN enabled TEST=`gdbus call -y -d fi.w1.wpa_supplicant1 -o /fi/w1/wpa_supplicant1/Interfaces/0 -m fi.w1.wpa_supplicant1.Interface.RemoveAllNetworks` -- especially with ASAN enabled Change-Id: I1508d2837e7677371015b852d16c4a4d83b7d367 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/hostap/+/2368059 Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Matthew Wang <matthewmwang@chromium.org> Tested-by: Brian Norris <briannorris@chromium.org> Commit-Queue: Brian Norris <briannorris@chromium.org> (cherry picked from commit 240cb8214397fc9e08b27af29c98cf2685f6e7a4) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/hostap/+/2372733 Reviewed-by: Brian Norris <briannorris@chromium.org>