From Fedora Project Wiki

< Desktop‎ | Whiteboards

Revision as of 20:29, 5 March 2012 by Stefw (talk | contribs) (Add page about privacy and security of running avahi by default)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Avahi by Default on the Desktop

Note: this is not an opinion piece, but do feel free to contribute with actual facts or research.

Use case

  • User is in at home or in a print shop (like Kinkos) and wants to print to a new printer.
  • Opens "Printers" to add a new printer.
  • Printer is advertised using MDNS and user sees it, clicks on it to install.

Currently this does not work in Fedora. Avahi is blocked by our firewall by default. Obviously many printers don't use MDNS. This is about MDNS and our implemantation: Avahi.

Note that a firewall is orthogonal this use case, even when zones are implemented. We want printers to be discoverable from the "Printers" control panel even on hostile networks. The user should not have to type their root password for a polkit prompt to see printers on the network. Neither should they have to disable their firewall or play with it.

If the current implementation of printer discovery using MDNS is not secure, it should be possible to make it secure and make this use case work.

Privacy and Security Issues

Running Avahi by default, in its current state runs into security and privacy issues.

We would like to enumerate those issues here, so that we can sufficiently neuter Avahi so that it can be run by default without a firewall and not pose any threat to the system. The end goal is to facilitate the above use cases, and others like it.

Privacy: PTR and HINFO records

By default Avahi publishes the following information.

  • Host name
  • CPU architecture, and system type (HINFO records)

Recommendation: Don't publish anything unless specifically approved by the user.

Privacy: SSH service

Installed by avahi package on Fedora.

Recommendation: Only advertise over Avahi when service is enabled. When service is enabled allow through firewall. Disable service by default.

Privacy: libvirt service

virt-manager can connect to it and show you the VM available on the remote system:

Recommendation: Disable remote VM access and discovery by default

Privacy: udisks service

Already removed in udisks2

Possible Security: nsswitch.conf integration

Unclear if this is a security problem.

With the nsswitch.conf integration, MDNS can affect the resolv lookups on the machine. This is limited to .local domains, and domains explicitly configured in avahi for MDNS.

In theory, changing the results of resolver lookups can be a limited security threat, when running on a hostile network. However this is limited to .local by default.

In addition if DHCP is used on the network in question (usually the case), then the attacker can simply push another DNS server to the client machine and attack using that vector instead.