@@ -43,6 +43,8 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/avahi-${PV}.tar.gz \
file://CVE-2025-68471.patch \
file://CVE-2026-34933-1.patch \
file://CVE-2026-34933-2.patch \
+ file://CVE-2026-59987_p1.patch \
+ file://CVE-2026-59987_p2.patch \
"
GITHUB_BASE_URI = "https://github.com/avahi/avahi/releases/"
new file mode 100644
@@ -0,0 +1,64 @@
+From 41c005670c596e1f7c5fc00c5a47cffa8185ef25 Mon Sep 17 00:00:00 2001
+From: Evgeny Vereshchagin <evvers@ya.ru>
+Date: Mon, 22 Jun 2026 03:30:28 +0000
+Subject: [PATCH] common: make sure valid domain names can be normalized
+
+It fixes a bug where it was possible for unprivileged local users to
+crash avahi-daemon via D-Bus by calling the RecordBrowserNew method with
+bogus domain names. For example when the following commands were run
+```
+l=$(perl -e 'print(join(".", ("["x63)x15))')
+busctl call org.freedesktop.Avahi / org.freedesktop.Avahi.Server RecordBrowserNew "iisqqu" -- -1 -1 "$l" 0 0 0
+```
+avahi-daemon crashed with
+```
+avahi-daemon: dbus-protocol.c:984: dbus_prepare_record_browser_object: Assertion `key' failed.
+==2424==
+==2424== Process terminating with default action of signal 6 (SIGABRT)
+==2424== at 0x4B31DCC: __pthread_kill_implementation (in /usr/lib64/libc.so.6)
+==2424== by 0x4AD6F8D: raise (in /usr/lib64/libc.so.6)
+==2424== by 0x4ABE7B2: abort (in /usr/lib64/libc.so.6)
+==2424== by 0x4ABF803: __libc_message_impl.cold (in /usr/lib64/libc.so.6)
+==2424== by 0x4ACEE44: __assert_fail (in /usr/lib64/libc.so.6)
+==2424== by 0x4002FB8: dbus_prepare_record_browser_object.cold (dbus-protocol.c:984)
+==2424== by 0x400E4E9: dbus_select_browser.isra.0 (dbus-protocol.c:1119)
+==2424== by 0x400FCA0: msg_server_impl (dbus-protocol.c:1185)
+==2424== by 0x4A75DA3: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.38.3)
+==2424== by 0x4014122: dispatch_timeout_callback.lto_priv.0 (dbus-watch-glue.c:105)
+==2424== by 0x489CB4F: avahi_simple_poll_dispatch (in /usr/lib64/libavahi-common.so.3.5.4)
+==2424== by 0x4004EF7: run_server (main.c:1279)
+==2424== by 0x4004EF7: main (main.c:1708)
+```
+
+https://github.com/avahi/avahi/security/advisories/GHSA-4v6h-9g73-wm5j
+
+CVE: CVE-2026-59987
+Upstream-Status: Backport [https://github.com/avahi/avahi/commit/41c005670c596e1f7c5fc00c5a47cffa8185ef25]
+
+Signed-off-by: Yogita Urade <yurade@cisco.com>
+---
+ avahi-common/domain.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/avahi-common/domain.c b/avahi-common/domain.c
+index 88c6f01..5923a29 100644
+--- a/avahi-common/domain.c
++++ b/avahi-common/domain.c
+@@ -369,11 +369,15 @@ int avahi_is_valid_service_subtype(const char *t) {
+
+ int avahi_is_valid_domain_name(const char *t) {
+ int is_first = 1;
++ char normalized[AVAHI_DOMAIN_NAME_MAX];
+ assert(t);
+
+ if (strlen(t) >= AVAHI_DOMAIN_NAME_MAX)
+ return 0;
+
++ if (!(avahi_normalize_name(t, normalized, sizeof(normalized))))
++ return 0;
++
+ do {
+ char label[AVAHI_LABEL_MAX];
+
+--
+2.43.0
new file mode 100644
@@ -0,0 +1,43 @@
+From 5456796db28204c8dfc61b14814f52f4b3645530 Mon Sep 17 00:00:00 2001
+From: Evgeny Vereshchagin <evvers@ya.ru>
+Date: Mon, 22 Jun 2026 02:07:24 +0000
+Subject: [PATCH] ci: add tests to make sure valid domain names can be normalized
+
+The unit test makes sure the specific domain name is rejected, the fuzz
+target makes sure that the invariant holds in general and the
+integration test makes sure that it all actually works via D-Bus without
+crashing anywhere.
+
+CVE: CVE-2026-59987
+Upstream-Status: Backport [https://github.com/avahi/avahi/commit/5456796db28204c8dfc61b14814f52f4b3645530]
+
+Backport Changes:
+- Adapted the focused domain-name unit test to Avahi 0.8; the upstream fuzz
+ target and D-Bus smoke-test file are absent from this source version.
+
+Signed-off-by: Yogita Urade <yurade@cisco.com>
+---
+ avahi-common/domain-test.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c
+index 3acc1c1..ca70a40 100644
+--- a/avahi-common/domain-test.c
++++ b/avahi-common/domain-test.c
+@@ -120,6 +120,14 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
+ assert(avahi_is_valid_domain_name("."));
+ assert(avahi_is_valid_domain_name(""));
+
++ assert(!avahi_is_valid_domain_name(
++ "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[."
++ "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[."
++ "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[."
++ "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[."
++ "["
++ ));
++
+ assert(avahi_normalize_name(".", t, sizeof(t)));
+ assert(avahi_normalize_name("", t, sizeof(t)));
+
+--
+2.35.6
This patch applies the upstream fix as referenced in [3], using the commits shown in [1] and [2]. [1] https://github.com/avahi/avahi/commit/41c005670c596e1f7c5fc00c5a47cffa8185ef25 [2] https://github.com/avahi/avahi/commit/5456796db28204c8dfc61b14814f52f4b3645530 [3] https://github.com/avahi/avahi/security/advisories/GHSA-4v6h-9g73-wm5j [4] https://github.com/avahi/avahi/pull/939 Signed-off-by: Yogita Urade <yurade@cisco.com> --- meta/recipes-connectivity/avahi/avahi_0.8.bb | 2 + .../avahi/files/CVE-2026-59987_p1.patch | 64 +++++++++++++++++++ .../avahi/files/CVE-2026-59987_p2.patch | 43 +++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 meta/recipes-connectivity/avahi/files/CVE-2026-59987_p1.patch create mode 100644 meta/recipes-connectivity/avahi/files/CVE-2026-59987_p2.patch