]> git.ipfire.org Git - thirdparty/hostap.git/commit
D-Bus: Fix P2P NULL dereference after interface removal
authorDavide Caratti <davide.caratti@gmail.com>
Wed, 2 Oct 2019 12:08:41 +0000 (14:08 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 27 Oct 2019 13:40:15 +0000 (15:40 +0200)
commitb2ad4e6b24ed0271ca76cb27856def0a701fb778
treefb31e371cdff60f3412b75000769b103dc75a168
parent937644aa2c677d930560e368c7c91c8bd194f0bd
D-Bus: Fix P2P NULL dereference after interface removal

When the P2P management interface is deleted, P2P is then disabled and
global->p2p_init_wpa_s is set to NULL. After that, other interfaces can
still trigger P2P functions (like wpas_p2p_find()) using D-Bus. This
makes wpa_supplicant terminate with SIGSEGV, because it dereferences a
NULL pointer. Fix this by adding proper checks, like it's done with
wpa_cli.

CC: Beniamino Galvani <bgalvani@redhat.com>
CC: Benjamin Berg <benjamin@sipsolutions.net>
Reported-by: Vladimir Benes <vbenes@redhat.com>
Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
wpa_supplicant/dbus/dbus_new_handlers_p2p.c