mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
import patches from ubuntu to fix CVE-2023-1981 CVE-2023-38469 CVE-2023-38470 CVE-2023-38471 CVE-2023-38472 CVE-2023-38473 Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches?h=ubuntu/focal-security Upstream commita2696da2f2&a337a1ba7d&c6cab87df2&94cb648911&20dec84b24&894f085f40&b675f70739&b024ae5749&b448c9f771] (From OE-Core rev: 4771e335cd4d95e734d7f07a718319f4543ce2f1) Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
61 lines
2.1 KiB
Diff
61 lines
2.1 KiB
Diff
Backport of:
|
|
|
|
From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
|
Date: Thu, 17 Nov 2022 01:51:53 +0100
|
|
Subject: [PATCH] Emit error if requested service is not found
|
|
|
|
It currently just crashes instead of replying with error. Check return
|
|
value and emit error instead of passing NULL pointer to reply.
|
|
|
|
Fixes #375
|
|
|
|
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-1981.patch?h=ubuntu/focal-security
|
|
Upstream commit https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f]
|
|
CVE: CVE-2023-1981
|
|
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
|
|
---
|
|
avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------
|
|
1 file changed, 14 insertions(+), 6 deletions(-)
|
|
|
|
--- a/avahi-daemon/dbus-protocol.c
|
|
+++ b/avahi-daemon/dbus-protocol.c
|
|
@@ -391,10 +391,14 @@ static DBusHandlerResult msg_server_impl
|
|
}
|
|
|
|
t = avahi_alternative_host_name(n);
|
|
- avahi_dbus_respond_string(c, m, t);
|
|
- avahi_free(t);
|
|
-
|
|
- return DBUS_HANDLER_RESULT_HANDLED;
|
|
+ if (t) {
|
|
+ avahi_dbus_respond_string(c, m, t);
|
|
+ avahi_free(t);
|
|
+
|
|
+ return DBUS_HANDLER_RESULT_HANDLED;
|
|
+ } else {
|
|
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found");
|
|
+ }
|
|
|
|
} else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetAlternativeServiceName")) {
|
|
char *n, *t;
|
|
@@ -405,10 +409,14 @@ static DBusHandlerResult msg_server_impl
|
|
}
|
|
|
|
t = avahi_alternative_service_name(n);
|
|
- avahi_dbus_respond_string(c, m, t);
|
|
- avahi_free(t);
|
|
-
|
|
- return DBUS_HANDLER_RESULT_HANDLED;
|
|
+ if (t) {
|
|
+ avahi_dbus_respond_string(c, m, t);
|
|
+ avahi_free(t);
|
|
+
|
|
+ return DBUS_HANDLER_RESULT_HANDLED;
|
|
+ } else {
|
|
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found");
|
|
+ }
|
|
|
|
} else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "EntryGroupNew")) {
|
|
Client *client;
|