Reach avahi · 8 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
Avahi is a system which facilitates service discovery on a local network via the mDNS/DNS-SD protocol suite. In versions up to and including 0.9-rc5, the simple protocol server ignores the documented client limit and accepts unlimited connections, allowing for easy local DoS. Although CLIENTS_MAX is defined, server_work() unconditionally accept()s and client_new() always appends the new client and increments n_clients. There is no check against the limit. When client cannot be accepted as a result of maximal socket number of avahi-daemon, it logs unconditionally error per each connection. Unprivileged local users can exhaust daemon memory and file descriptors, causing a denial of service system-wide for mDNS/DNS-SD. Exhausting local file descriptors causes increased system load caused by logging errors of each of request. Overloading prevents glibc calls using nss-mdns plugins to resolve *.local. names and link-local addresses. As of time of publication, no known patched versions are available, but a candidate fix is available in pull request 808, and some workarounds are available. Simple clients are offered for nss-mdns package functionality. It is not possible to disable the unix socket /run/avahi-daemon/socket, but resolution requests received via DBus are not affected directly. Tools avahi-resolve, avahi-resolve-address and avahi-resolve-host-name are not affected, they use DBus interface. It is possible to change permissions of unix socket after avahi-daemon is started. But avahi-daemon does not provide any configuration for it. Additional access restrictions like SELinux can also prevent unwanted tools to access the socket and keep resolution working for trusted users.
Published 2025-12-18NVD
CVSS 3.1Local · low privileges · no user interaction
How it is reached
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
What it costs
- Confidentiality
- None
- Integrity
- None
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Fable 5.1 · high confidence · 2026-11-05
The vulnerable simple-protocol server code is present unmodified in this build: output/build/avahi-0.8/avahi-daemon/simple-protocol.c defines CLIENTS_MAX (line 60) but server_work() accepts unconditionally (line 446) and client_new() always appends and increments n_clients (line 148); none of the 20 applied patches touch this logic (0003 only adds HUP handling to client_work).
avahi-daemon is unconditionally built (BR2_PACKAGE_AVAHI_DAEMON=y), always calls simple_protocol_setup() (main.c:1207) creating the AF_LOCAL socket /run/avahi-daemon/socket with umask(0000), and the factory default enables mDNS (src/confd/share/factory.d/10-infix-services.json: "infix-services:mdns": {"enabled": true}), so confd starts the finit "mdns"/avahi service in the shipped configuration.
The attack surface is a local unix socket only (AV:L): it is not reachable from any network interface, but any local process/user on the device can open unlimited connections and exhaust daemon memory/fds, breaking .local resolution via nss-mdns (BR2_PACKAGE_NSS_MDNS=y, nsswitch.conf uses mdns4_minimal).
Evidence 12
#define CLIENTS_MAX 50 is defined but never checked
output/build/avahi-0.8/avahi-daemon/simple-protocol.c:60
accept() is called unconditionally and client_new() invoked for every connection, no limit check; logs error on every failed accept
output/build/avahi-0.8/avahi-daemon/simple-protocol.c:438-451 (server_work)
n_clients++ always, new client always appended — matches vulnerable code described by the CVE
output/build/avahi-0.8/avahi-daemon/simple-protocol.c:148 (client_new)
20 patches applied; only 0003 touches simple-protocol.c and it only adds AVAHI_WATCH_HUP handling in client_work, not the accept limit. No patch references CLIENTS_MAX or PR 808/975
output/build/avahi-0.8/.applied_patches_list + buildroot/package/avahi/0003-*.patch
AVAHI_VERSION = 0.8; BR2_PACKAGE_AVAHI=y, BR2_PACKAGE_AVAHI_DAEMON=y — daemon built for the target
buildroot/package/avahi/avahi.mk:7, output/.config
simple_protocol_setup() is called unconditionally at daemon startup; no configure option disables the simple protocol
output/build/avahi-0.8/avahi-daemon/main.c:1207
umask(0000) and AF_LOCAL socket bound at AVAHI_SOCKET (/run/avahi-daemon/socket) — world-connectable local socket
output/build/avahi-0.8/avahi-daemon/simple-protocol.c:468-499
Factory default: "infix-services:mdns": {"enabled": true}
src/confd/share/factory.d/10-infix-services.json
When mdns/enabled is true confd calls svc_enable(.., "avahi") and finit_reload("avahi") — daemon runs by default
src/confd/src/services.c:425-449 (mdns_change)
finit service 'mdns' runs avahi-daemon -s $AVAHI_ARGS
output/target/etc/finit.d/available/avahi.conf (from package/skeleton-init-finit/skeleton/etc/finit.d/available/avahi.conf)
YANG node /infix-services:mdns/enabled controls the service (can be disabled by operator)
src/confd/yang/confd/infix-services.yang:104-110
BR2_PACKAGE_NSS_MDNS=y; hosts: files mdns4_minimal ... mdns4 — nss-mdns uses the simple-protocol socket, so DoS impacts .local name resolution on the device
output/.config:2757 and output/target/etc/nsswitch.conf:7
Version and patches
Advisory GHSA-73wf-3xmj-x82q: all versions up to and including 0.9-rc5 affected; no released fix at publication (candidate fix PR 808 / PR 975 adds a CLIENTS_MAX check in server_work/client_new). This tree ships avahi 0.8 with 17 Buildroot + 3 Infix patches, none of which add the client-limit check. CPE match is correct.
Recommendation
Backport the client-limit fix from upstream PR 808/975 (small change to avahi-daemon/simple-protocol.c: reject/close accept()ed connections once n_clients >= CLIENTS_MAX, and rate-limit the accept() error log) as an additional Infix patch under patches/avahi/, or upgrade when a fixed avahi release is available. Severity is moderate: local-only (unix socket), DoS of mDNS/.local resolution; it does not affect network-facing surfaces. Interim mitigation is possible by disabling /infix-services:mdns/enabled where mDNS is not needed.
Open questions
Whether an unprivileged (non-admin) local account can actually obtain a shell/process on a shipped Infix device to connect to the socket was not determined; the default CLI user model may limit local attackers to admin users, which would reduce practical risk but does not change the fact that the vulnerable code runs by default.
Members of Kernel Kit decide. Sign in if you are one.