Open
Refix CVE-2026-59987 #207
Refix CVE-2026-59987 #207
Open
nickyangAdd on 3 days ago
Total: 2 files changed+15-8
Mavahi.spec+4-1File content is under review, please try again later
@@ -2,7 +2,7 @@ From cfeef2a28e260c67caac4b88440729c744cb24b6 Mon Sep 17 00:00:00 2001
2From: Evgeny Vereshchagin <evvers@ya.ru>2From: Evgeny Vereshchagin <evvers@ya.ru>
3Date: Mon, 22 Jun 2026 03:30:28 +00003Date: Mon, 22 Jun 2026 03:30:28 +0000
4Subject: [PATCH] common: make sure valid domain names can be normalized4Subject: [PATCH] common: make sure valid domain names can be normalized
5- 5+
6It fixes a bug where it was possible for unprivileged local users to6It fixes a bug where it was possible for unprivileged local users to
7crash avahi-daemon via D-Bus by calling the RecordBrowserNew method with7crash avahi-daemon via D-Bus by calling the RecordBrowserNew method with
8bogus domain names. For example when the following commands were run8bogus domain names. For example when the following commands were run
@@ -29,28 +29,32 @@ avahi-daemon: dbus-protocol.c:984: dbus_prepare_record_browser_object: Assertion
29==2424== by 0x4004EF7: run_server (main.c:1279)29==2424== by 0x4004EF7: run_server (main.c:1279)
30==2424== by 0x4004EF7: main (main.c:1708)30==2424== by 0x4004EF7: main (main.c:1708)
31```31```
32- 32+
33https://github.com/avahi/avahi/security/advisories/GHSA-4v6h-9g73-wm5j33https://github.com/avahi/avahi/security/advisories/GHSA-4v6h-9g73-wm5j
34---34---
35 avahi-common/domain.c | 4 ++++35 avahi-common/domain.c | 4 ++++
36 1 file changed, 4 insertions(+)36 1 file changed, 4 insertions(+)
37 37 
38diff --git a/avahi-common/domain.c b/avahi-common/domain.c38diff --git a/avahi-common/domain.c b/avahi-common/domain.c
39-index 2085f48..ab3ff6a 10064439+index 2085f48..31c63bc 100644
40--- a/avahi-common/domain.c40--- a/avahi-common/domain.c
41+++ b/avahi-common/domain.c41+++ b/avahi-common/domain.c
42-@@ -368,7 +368,11 @@ int avahi_is_valid_service_subtype(const char *t) {42+@@ -368,11 +368,15 @@ int avahi_is_valid_service_subtype(const char *t) {
43 43
44 int avahi_is_valid_domain_name(const char *t) {44 int avahi_is_valid_domain_name(const char *t) {
45 int is_first = 1;45 int is_first = 1;
46+ char normalized[AVAHI_DOMAIN_NAME_MAX];46+ char normalized[AVAHI_DOMAIN_NAME_MAX];
47 assert(t);47 assert(t);
48-+
49-+ if (!(avahi_normalize_name(t, normalized, sizeof(normalized))))
50-+ return 0;
51 48
52 if (strlen(t) >= AVAHI_DOMAIN_NAME_MAX)49 if (strlen(t) >= AVAHI_DOMAIN_NAME_MAX)
53 return 0;50 return 0;
51+
52++ if (!(avahi_normalize_name(t, normalized, sizeof(normalized))))
53++ return 0;
54++
55+ do {
56+ char label[AVAHI_LABEL_MAX];
57+
54-- 58--
552.54.0592.54.0
56 60