Skip to content

Commit d1ac73c

Browse files
[AutoPR- Security] Patch avahi for CVE-2026-34933 [MEDIUM] (#16539)
Co-authored-by: Kanishk Bansal <103916909+Kanishk-Bansal@users.noreply.github.com>
1 parent 89299db commit d1ac73c

2 files changed

Lines changed: 216 additions & 1 deletion

File tree

SPECS/avahi/CVE-2026-34933.patch

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
From 3e454de4577863d88b1da97e37dba22e37d138b5 Mon Sep 17 00:00:00 2001
2+
From: Evgeny Vereshchagin <evvers@ya.ru>
3+
Date: Wed, 1 Apr 2026 05:31:58 +0000
4+
Subject: [PATCH 1/3] core: refuse to accept publish flags where both wide_area
5+
and multicast are set
6+
7+
It fixes a bug where it was possible for unprivileged local users to
8+
crash avahi-daemon via D-Bus by calling EntryGroup methods accepting
9+
flags and passing both AVAHI_PUBLISH_USE_WIDE_AREA and
10+
AVAHI_PUBLISH_USE_MULTICAST there. For example when AddRecord was
11+
invoked like that avahi-daemon crashed with
12+
```
13+
dbus-entry-group.c: interface=org.freedesktop.Avahi.EntryGroup, path=/Client0/EntryGroup1, member=AddRecord
14+
avahi-daemon: entry.c:57: transport_flags_from_domain: Assertion `!((*flags & AVAHI_PUBLISH_USE_MULTICAST) && (*flags & AVAHI_PUBLISH_USE_WIDE_AREA))' failed.
15+
==84944==
16+
==84944== Process terminating with default action of signal 6 (SIGABRT)
17+
==84944== at 0x4B353BC: __pthread_kill_implementation (pthread_kill.c:44)
18+
==84944== by 0x4ADE941: raise (raise.c:26)
19+
==84944== by 0x4AC64AB: abort (abort.c:77)
20+
==84944== by 0x4AC641F: __assert_fail_base.cold (assert.c:118)
21+
==84944== by 0x48A9404: transport_flags_from_domain (entry.c:57)
22+
==84944== by 0x48A9F8F: server_add_internal (entry.c:224)
23+
==84944== by 0x48AA49F: avahi_server_add (entry.c:324)
24+
==84944== by 0x401A670: avahi_dbus_msg_entry_group_impl (dbus-entry-group.c:348)
25+
==84944== by 0x4A70741: ??? (in /usr/lib/x86_64-linux-gnu/libdbus-1.so.3.38.3)
26+
==84944== by 0x4A5FB22: dbus_connection_dispatch (in /usr/lib/x86_64-linux-gnu/libdbus-1.so.3.38.3)
27+
==84944== by 0x401D01D: dispatch_timeout_callback (dbus-watch-glue.c:105)
28+
==84944== by 0x488E3AE: timeout_callback (simple-watch.c:447)
29+
==84944==
30+
```
31+
It's a follow-up to fbce111b069aa1e4c701ed37ee1d9f6d6cefaac5 where
32+
those flags were introduced and consistent with the other places
33+
where wide_area/multicast flags are used.
34+
35+
It was discovered by
36+
Guillaume Meunier - Head of Vulnerability Operations Center France - Orange Cyberdefense
37+
38+
https://github.com/avahi/avahi/security/advisories/GHSA-w65r-6gxh-vhvc
39+
40+
CVE-2026-34933
41+
Upstream-reference: https://patch-diff.githubusercontent.com/raw/avahi/avahi/pull/891.patch
42+
---
43+
avahi-core/entry.c | 7 +++++++
44+
1 file changed, 7 insertions(+)
45+
46+
diff --git a/avahi-core/entry.c b/avahi-core/entry.c
47+
index 0d86213..06eb120 100644
48+
--- a/avahi-core/entry.c
49+
+++ b/avahi-core/entry.c
50+
@@ -207,6 +207,7 @@ static AvahiEntry * server_add_internal(
51+
AVAHI_PUBLISH_UPDATE|
52+
AVAHI_PUBLISH_USE_WIDE_AREA|
53+
AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
54+
+ AVAHI_CHECK_VALIDITY_RETURN_NULL(s, !(flags & AVAHI_PUBLISH_USE_WIDE_AREA) || !(flags & AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
55+
AVAHI_CHECK_VALIDITY_RETURN_NULL(s, avahi_is_valid_domain_name(r->key->name), AVAHI_ERR_INVALID_HOST_NAME);
56+
AVAHI_CHECK_VALIDITY_RETURN_NULL(s, r->ttl != 0, AVAHI_ERR_INVALID_TTL);
57+
AVAHI_CHECK_VALIDITY_RETURN_NULL(s, !avahi_key_is_pattern(r->key), AVAHI_ERR_IS_PATTERN);
58+
@@ -454,6 +455,7 @@ int avahi_server_add_address(
59+
AVAHI_PUBLISH_UPDATE|
60+
AVAHI_PUBLISH_USE_WIDE_AREA|
61+
AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
62+
+ AVAHI_CHECK_VALIDITY(s, !(flags & AVAHI_PUBLISH_USE_WIDE_AREA) || !(flags & AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
63+
AVAHI_CHECK_VALIDITY(s, !name || avahi_is_valid_fqdn(name), AVAHI_ERR_INVALID_HOST_NAME);
64+
65+
/* Prepare the host naem */
66+
@@ -595,6 +597,7 @@ static int server_add_service_strlst_nocopy(
67+
AVAHI_PUBLISH_UPDATE|
68+
AVAHI_PUBLISH_USE_WIDE_AREA|
69+
AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
70+
+ AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !(flags & AVAHI_PUBLISH_USE_WIDE_AREA) || !(flags & AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
71+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_name(name), AVAHI_ERR_INVALID_SERVICE_NAME);
72+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_type_strict(type), AVAHI_ERR_INVALID_SERVICE_TYPE);
73+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
74+
@@ -754,6 +757,7 @@ static int server_update_service_txt_strlst_nocopy(
75+
AVAHI_PUBLISH_NO_COOKIE|
76+
AVAHI_PUBLISH_USE_WIDE_AREA|
77+
AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
78+
+ AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !(flags & AVAHI_PUBLISH_USE_WIDE_AREA) || !(flags & AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
79+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_name(name), AVAHI_ERR_INVALID_SERVICE_NAME);
80+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_type_strict(type), AVAHI_ERR_INVALID_SERVICE_TYPE);
81+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
82+
@@ -843,6 +847,7 @@ int avahi_server_add_service_subtype(
83+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
84+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL);
85+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, AVAHI_FLAGS_VALID(flags, AVAHI_PUBLISH_USE_MULTICAST|AVAHI_PUBLISH_USE_WIDE_AREA), AVAHI_ERR_INVALID_FLAGS);
86+
+ AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !(flags & AVAHI_PUBLISH_USE_WIDE_AREA) || !(flags & AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
87+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_name(name), AVAHI_ERR_INVALID_SERVICE_NAME);
88+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, avahi_is_valid_service_type_strict(type), AVAHI_ERR_INVALID_SERVICE_TYPE);
89+
AVAHI_CHECK_VALIDITY_SET_RET_GOTO_FAIL(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
90+
@@ -910,6 +915,7 @@ static AvahiEntry *server_add_dns_server_name(
91+
assert(name);
92+
93+
AVAHI_CHECK_VALIDITY_RETURN_NULL(s, AVAHI_FLAGS_VALID(flags, AVAHI_PUBLISH_USE_WIDE_AREA|AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
94+
+ AVAHI_CHECK_VALIDITY_RETURN_NULL(s, !(flags & AVAHI_PUBLISH_USE_WIDE_AREA) || !(flags & AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
95+
AVAHI_CHECK_VALIDITY_RETURN_NULL(s, type == AVAHI_DNS_SERVER_UPDATE || type == AVAHI_DNS_SERVER_RESOLVE, AVAHI_ERR_INVALID_FLAGS);
96+
AVAHI_CHECK_VALIDITY_RETURN_NULL(s, port != 0, AVAHI_ERR_INVALID_PORT);
97+
AVAHI_CHECK_VALIDITY_RETURN_NULL(s, avahi_is_valid_fqdn(name), AVAHI_ERR_INVALID_HOST_NAME);
98+
@@ -967,6 +973,7 @@ int avahi_server_add_dns_server_address(
99+
AVAHI_CHECK_VALIDITY(s, AVAHI_IF_VALID(interface), AVAHI_ERR_INVALID_INTERFACE);
100+
AVAHI_CHECK_VALIDITY(s, AVAHI_PROTO_VALID(protocol) && AVAHI_PROTO_VALID(address->proto), AVAHI_ERR_INVALID_PROTOCOL);
101+
AVAHI_CHECK_VALIDITY(s, AVAHI_FLAGS_VALID(flags, AVAHI_PUBLISH_USE_MULTICAST|AVAHI_PUBLISH_USE_WIDE_AREA), AVAHI_ERR_INVALID_FLAGS);
102+
+ AVAHI_CHECK_VALIDITY(s, !(flags & AVAHI_PUBLISH_USE_WIDE_AREA) || !(flags & AVAHI_PUBLISH_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS);
103+
AVAHI_CHECK_VALIDITY(s, type == AVAHI_DNS_SERVER_UPDATE || type == AVAHI_DNS_SERVER_RESOLVE, AVAHI_ERR_INVALID_FLAGS);
104+
AVAHI_CHECK_VALIDITY(s, port != 0, AVAHI_ERR_INVALID_PORT);
105+
AVAHI_CHECK_VALIDITY(s, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME);
106+
--
107+
2.45.4
108+
109+
110+
From 2f688b537b2af03a2005a7b8d7869b7fe84a9c17 Mon Sep 17 00:00:00 2001
111+
From: Evgeny Vereshchagin <evvers@ya.ru>
112+
Date: Wed, 1 Apr 2026 05:30:58 +0000
113+
Subject: [PATCH 2/3] tests: make sure AVAHI_PUBLISH_USE_WIDE_AREA is refused
114+
115+
---
116+
avahi-client/client-test.c | 25 +++++++++++++++++++++++++
117+
avahi-core/avahi-test.c | 12 +++++++++++-
118+
2 files changed, 36 insertions(+), 1 deletion(-)
119+
120+
diff --git a/avahi-client/client-test.c b/avahi-client/client-test.c
121+
index 57750a4..42f5b70 100644
122+
--- a/avahi-client/client-test.c
123+
+++ b/avahi-client/client-test.c
124+
@@ -209,6 +209,28 @@ static void terminate(AVAHI_GCC_UNUSED AvahiTimeout *timeout, AVAHI_GCC_UNUSED v
125+
avahi_simple_poll_quit(simple_poll);
126+
}
127+
128+
+static void test_refuse_publish_flags(AvahiEntryGroup *g, AvahiPublishFlags flags, int expected) {
129+
+ AvahiAddress a;
130+
+ AvahiStringList *l = NULL;
131+
+ int r;
132+
+
133+
+ r = avahi_entry_group_add_record(g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, flags, "test.local", AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_CNAME, 120, "\0", 1);
134+
+ assert(r == expected);
135+
+
136+
+ avahi_address_parse("224.0.0.251", AVAHI_PROTO_UNSPEC, &a);
137+
+ r = avahi_entry_group_add_address(g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, flags, "test.local", &a);
138+
+ assert(r == expected);
139+
+
140+
+ r = avahi_entry_group_add_service_strlst(g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, flags, "test", "_http._tcp", NULL, NULL, 80, l);
141+
+ assert(r == expected);
142+
+
143+
+ r = avahi_entry_group_update_service_txt_strlst(g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, flags, "test", "_http._tcp", NULL, l);
144+
+ assert(r == expected);
145+
+
146+
+ r = avahi_entry_group_add_service_subtype(g, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, flags, "test", "_http._tcp", NULL, "_magic._sub._http._tcp");
147+
+ assert(r == expected);
148+
+}
149+
+
150+
int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
151+
AvahiClient *avahi;
152+
AvahiEntryGroup *group, *group2;
153+
@@ -261,6 +283,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
154+
error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0);
155+
assert(error != AVAHI_OK);
156+
157+
+ test_refuse_publish_flags(group, AVAHI_PUBLISH_USE_WIDE_AREA, AVAHI_ERR_NOT_SUPPORTED);
158+
+ test_refuse_publish_flags(group, AVAHI_PUBLISH_USE_WIDE_AREA|AVAHI_PUBLISH_USE_MULTICAST, AVAHI_ERR_INVALID_FLAGS);
159+
+
160+
avahi_entry_group_commit (group);
161+
162+
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
163+
diff --git a/avahi-core/avahi-test.c b/avahi-core/avahi-test.c
164+
index 2a7872b..2bae82b 100644
165+
--- a/avahi-core/avahi-test.c
166+
+++ b/avahi-core/avahi-test.c
167+
@@ -30,6 +30,7 @@
168+
#include <netinet/in.h>
169+
#include <arpa/inet.h>
170+
171+
+#include <avahi-common/error.h>
172+
#include <avahi-common/malloc.h>
173+
#include <avahi-common/simple-watch.h>
174+
#include <avahi-common/alternative.h>
175+
@@ -150,6 +151,7 @@ static void remove_entries(void) {
176+
static void create_entries(int new_name) {
177+
AvahiAddress a;
178+
AvahiRecord *r;
179+
+ int error;
180+
181+
remove_entries();
182+
183+
@@ -181,7 +183,15 @@ static void create_entries(int new_name) {
184+
goto fail;
185+
}
186+
187+
- if (avahi_server_add_dns_server_address(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, NULL, AVAHI_DNS_SERVER_RESOLVE, avahi_address_parse("192.168.50.1", AVAHI_PROTO_UNSPEC, &a), 53) < 0) {
188+
+ avahi_address_parse("192.168.50.1", AVAHI_PROTO_UNSPEC, &a);
189+
+
190+
+ error = avahi_server_add_dns_server_address(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_PUBLISH_USE_WIDE_AREA, NULL, AVAHI_DNS_SERVER_RESOLVE, &a, 53);
191+
+ assert(error == AVAHI_ERR_NOT_SUPPORTED);
192+
+
193+
+ error = avahi_server_add_dns_server_address(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AVAHI_PUBLISH_USE_WIDE_AREA|AVAHI_PUBLISH_USE_MULTICAST, NULL, AVAHI_DNS_SERVER_RESOLVE, &a, 53);
194+
+ assert(error == AVAHI_ERR_INVALID_FLAGS);
195+
+
196+
+ if (avahi_server_add_dns_server_address(server, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, NULL, AVAHI_DNS_SERVER_RESOLVE, &a, 53) < 0) {
197+
avahi_log_error("Failed to add new DNS Server address");
198+
goto fail;
199+
}
200+
--
201+
2.45.4
202+
203+
204+
From 57746739749f4b7706a0c833f7b62f2da51e6de3 Mon Sep 17 00:00:00 2001
205+
From: Evgeny Vereshchagin <evvers@ya.ru>
206+
Date: Wed, 1 Apr 2026 12:18:33 +0000
207+
Subject: [PATCH 3/3] build: bump
208+
209+
--
210+
2.45.4
211+

SPECS/avahi/avahi.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Summary: Local network service discovery
44
Name: avahi
55
Version: 0.8
6-
Release: 7%{?dist}
6+
Release: 8%{?dist}
77
License: LGPLv2+
88
Vendor: Microsoft Corporation
99
Distribution: Azure Linux
@@ -23,6 +23,7 @@ Patch10: CVE-2025-68276.patch
2323
Patch11: CVE-2025-68468.patch
2424
Patch12: CVE-2025-68471.patch
2525
Patch13: CVE-2026-24401.patch
26+
Patch14: CVE-2026-34933.patch
2627
BuildRequires: automake
2728
BuildRequires: dbus-devel >= 0.90
2829
BuildRequires: dbus-glib-devel >= 0.70
@@ -430,6 +431,9 @@ exit 0
430431
%endif
431432

432433
%changelog
434+
* Thu Apr 09 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 0.8-8
435+
- Patch for CVE-2026-34933
436+
433437
* Tue Jan 27 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 0.8-7
434438
- Patch for CVE-2026-24401
435439

0 commit comments

Comments
 (0)