[avahi] Avahi daemon dies on certain hostnames

Sjoerd Simons sjoerd at luon.net
Tue Mar 21 10:12:07 PST 2006


On Tue, Mar 21, 2006 at 05:53:07PM +0100, Sebastien Estienne wrote:
> On 3/21/06, Iván Sánchez Ortega <i.sanchez at mirame.net> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi,
> >
> > I just discovered that the Avahi daemon dies if one machine in the network
> > handles out a response with a strange host (or domain) name.
> >
> > I'm attaching the ethereal capture of the packet that "kills" the avahi
> > daemon, but this is how I can reproduce this:
> >
> > - - Buy an Axis IP camera
> > - - Change the camera hostname by issuing the following command:
> > wget
> > http://{camera_ip_address}/axis-cgi/admin/param.cgi?action=update&Network.Bonjour.FriendlyName=fóobar
> > (notice the acute in the 'ó')
> > - - Run avahi-browse -at
> > - - Watch how the avahi daemon dies.
> >
> > I guess that setting up any other kind of mDNS responder (an avahi daemon, a
> > Bonjour-enabled Mac, etc) to return a hostname with "strange" characters
> > (anything not in 7-bit ASCII, I guess, like in "fóobar") may be able to
> > reproduce this bug. By the way, I'm running Avahi 0.6.9 here.
> >
> >
> > Running avahi-browse -at in a network with such a device results in the
> > following error message:
> >
> > Client failure, exiting: Daemon connection failed
> > 14700: arguments to dbus_connection_get_is_connected() were incorrect,
> > assertion "connection != NULL" failed in file dbus-connection.c line 1984.
> > This is normally a bug in some application using the D-BUS library.
> 
> Are you sure that it's not the dbus daemon that is dying and then
> avahi-daemon cleanly exit because no more dbus-daemon is available?
> 
> >
> > And the following line in /var/log/syslog:
> >
> > Mar 21 16:23:27 localhost avahi-daemon[14700]: Disconnnected from D-BUS,
> > terminating...
> this message happens when the dbus-daemon is stopped, so avahi-daemon
> exits cleanly

This is probably caused by dbus kicking avahi-daemon of the bus. Try sending
invalid utf-8 as a string and it will kick you off. 

Hal had the same problem with volume labels that had non-utf8 strings. You
really need to sanatize untrusted strings before sending them onto dbus :)

  Sjoerd
-- 
If I set here and stare at nothing long enough, people might think
I'm an engineer working on something.
		-- S. R. McElroy


More information about the avahi mailing list