Unexpected terminations via D-Bus

Marcel Holtmann marcel at holtmann.org
Sat Dec 26 08:03:02 EST 2009


Hi Jouni,

> > so I started playing with the new D-Bus interface and it seems it has
> > still some issues in handling unexpected usage. So for example by
> > accident, I triggered a scan with an empty parameter dictionary and this
> > happens:
> > 
> > RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
> > wpas_dbus_handler_scan[dbus]: Scan type not specified
> > 
> > After that the daemon terminates. This is a pretty bad behavior. Either
> > we should return a proper error and continue or just fallback to some
> > default parameters.
> 
> That was a bug in wpas_dbus_handler_scan(). It used an uninitialized
> local variable as the error message in this particular case which
> resulted in odd termination later when something (libdbus?) actually
> tried to read the message from random memory location.. Anyway, that
> should now be fixed.
> 
> > I haven't checked any other method calls so far, but there might be
> > others.
> 
> I fixed couple more cases where invalid parameters could have trigger
> crashes, but haven't went through all the dbus code yet in detail.

and you broke the build while at it:

dbus/dbus_new.c: In function ‘wpas_dbus_register_network’:
dbus/dbus_new.c:1164: error: ‘os_free’ undeclared (first use in this function)
dbus/dbus_new.c:1164: error: (Each undeclared identifier is reported only once
dbus/dbus_new.c:1164: error: for each function it appears in.)
dbus/dbus_new.c: In function ‘wpas_dbus_register_bss’:
dbus/dbus_new.c:1332: error: ‘os_free’ undeclared (first use in this function)
make: *** [dbus/dbus_new.o] Error 1

Regards

Marcel




More information about the HostAP mailing list