diff options
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi_0.8.bb | 10 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch | 58 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch (renamed from meta/recipes-connectivity/avahi/files/CVE-2023-38469.patch) | 0 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch | 65 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch (renamed from meta/recipes-connectivity/avahi/files/CVE-2023-38470.patch) | 0 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch | 52 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch (renamed from meta/recipes-connectivity/avahi/files/CVE-2023-38471.patch) | 0 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch | 52 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch | 44 |
9 files changed, 256 insertions, 25 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi_0.8.bb b/meta/recipes-connectivity/avahi/avahi_0.8.bb index 7295c4e05b..1f18d4491d 100644 --- a/meta/recipes-connectivity/avahi/avahi_0.8.bb +++ b/meta/recipes-connectivity/avahi/avahi_0.8.bb | |||
@@ -26,9 +26,13 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/avahi-${PV}.tar.gz \ | |||
26 | file://handle-hup.patch \ | 26 | file://handle-hup.patch \ |
27 | file://local-ping.patch \ | 27 | file://local-ping.patch \ |
28 | file://invalid-service.patch \ | 28 | file://invalid-service.patch \ |
29 | file://CVE-2023-38469.patch \ | 29 | file://CVE-2023-1981.patch \ |
30 | file://CVE-2023-38470.patch \ | 30 | file://CVE-2023-38469-1.patch \ |
31 | file://CVE-2023-38471.patch \ | 31 | file://CVE-2023-38469-2.patch \ |
32 | file://CVE-2023-38470-1.patch \ | ||
33 | file://CVE-2023-38470-2.patch \ | ||
34 | file://CVE-2023-38471-1.patch \ | ||
35 | file://CVE-2023-38471-2.patch \ | ||
32 | file://CVE-2023-38472.patch \ | 36 | file://CVE-2023-38472.patch \ |
33 | file://CVE-2023-38473.patch \ | 37 | file://CVE-2023-38473.patch \ |
34 | " | 38 | " |
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch new file mode 100644 index 0000000000..4d7924d13a --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com> | ||
3 | Date: Thu, 17 Nov 2022 01:51:53 +0100 | ||
4 | Subject: [PATCH] Emit error if requested service is not found | ||
5 | |||
6 | It currently just crashes instead of replying with error. Check return | ||
7 | value and emit error instead of passing NULL pointer to reply. | ||
8 | |||
9 | Fixes #375 | ||
10 | |||
11 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-1981.patch?h=ubuntu/jammy-security | ||
12 | Upstream commit https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f] | ||
13 | CVE: CVE-2023-1981 | ||
14 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
15 | --- | ||
16 | avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------ | ||
17 | 1 file changed, 14 insertions(+), 6 deletions(-) | ||
18 | |||
19 | diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c | ||
20 | index 70d7687bc..406d0b441 100644 | ||
21 | --- a/avahi-daemon/dbus-protocol.c | ||
22 | +++ b/avahi-daemon/dbus-protocol.c | ||
23 | @@ -375,10 +375,14 @@ static DBusHandlerResult dbus_get_alternative_host_name(DBusConnection *c, DBusM | ||
24 | } | ||
25 | |||
26 | t = avahi_alternative_host_name(n); | ||
27 | - avahi_dbus_respond_string(c, m, t); | ||
28 | - avahi_free(t); | ||
29 | + if (t) { | ||
30 | + avahi_dbus_respond_string(c, m, t); | ||
31 | + avahi_free(t); | ||
32 | |||
33 | - return DBUS_HANDLER_RESULT_HANDLED; | ||
34 | + return DBUS_HANDLER_RESULT_HANDLED; | ||
35 | + } else { | ||
36 | + return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found"); | ||
37 | + } | ||
38 | } | ||
39 | |||
40 | static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DBusMessage *m, DBusError *error) { | ||
41 | @@ -389,10 +393,14 @@ static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DB | ||
42 | } | ||
43 | |||
44 | t = avahi_alternative_service_name(n); | ||
45 | - avahi_dbus_respond_string(c, m, t); | ||
46 | - avahi_free(t); | ||
47 | + if (t) { | ||
48 | + avahi_dbus_respond_string(c, m, t); | ||
49 | + avahi_free(t); | ||
50 | |||
51 | - return DBUS_HANDLER_RESULT_HANDLED; | ||
52 | + return DBUS_HANDLER_RESULT_HANDLED; | ||
53 | + } else { | ||
54 | + return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found"); | ||
55 | + } | ||
56 | } | ||
57 | |||
58 | static DBusHandlerResult dbus_create_new_entry_group(DBusConnection *c, DBusMessage *m, DBusError *error) { | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38469.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch index a078f66102..a078f66102 100644 --- a/meta/recipes-connectivity/avahi/files/CVE-2023-38469.patch +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch | |||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch new file mode 100644 index 0000000000..f8f60ddca1 --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From c6cab87df290448a63323c8ca759baa516166237 Mon Sep 17 00:00:00 2001 | ||
2 | From: Evgeny Vereshchagin <evvers@ya.ru> | ||
3 | Date: Wed, 25 Oct 2023 18:15:42 +0000 | ||
4 | Subject: [PATCH] tests: pass overly long TXT resource records | ||
5 | |||
6 | to make sure they don't crash avahi any more. | ||
7 | It reproduces https://github.com/lathiat/avahi/issues/455 | ||
8 | |||
9 | Canonical notes: | ||
10 | nickgalanis> removed first hunk since there is no .github dir in this release | ||
11 | |||
12 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38469-2.patch?h=ubuntu/jammy-security | ||
13 | Upstream commit https://github.com/lathiat/avahi/commit/c6cab87df290448a63323c8ca759baa516166237] | ||
14 | CVE: CVE-2023-38469 | ||
15 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
16 | --- | ||
17 | avahi-client/client-test.c | 14 ++++++++++++++ | ||
18 | 1 files changed, 14 insertions(+) | ||
19 | |||
20 | Index: avahi-0.8/avahi-client/client-test.c | ||
21 | =================================================================== | ||
22 | --- avahi-0.8.orig/avahi-client/client-test.c | ||
23 | +++ avahi-0.8/avahi-client/client-test.c | ||
24 | @@ -22,6 +22,7 @@ | ||
25 | #endif | ||
26 | |||
27 | #include <stdio.h> | ||
28 | +#include <string.h> | ||
29 | #include <assert.h> | ||
30 | |||
31 | #include <avahi-client/client.h> | ||
32 | @@ -33,6 +34,8 @@ | ||
33 | #include <avahi-common/malloc.h> | ||
34 | #include <avahi-common/timeval.h> | ||
35 | |||
36 | +#include <avahi-core/dns.h> | ||
37 | + | ||
38 | static const AvahiPoll *poll_api = NULL; | ||
39 | static AvahiSimplePoll *simple_poll = NULL; | ||
40 | |||
41 | @@ -222,6 +225,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA | ||
42 | uint32_t cookie; | ||
43 | struct timeval tv; | ||
44 | AvahiAddress a; | ||
45 | + uint8_t rdata[AVAHI_DNS_RDATA_MAX+1]; | ||
46 | + AvahiStringList *txt = NULL; | ||
47 | + int r; | ||
48 | |||
49 | simple_poll = avahi_simple_poll_new(); | ||
50 | poll_api = avahi_simple_poll_get(simple_poll); | ||
51 | @@ -258,6 +264,14 @@ int main (AVAHI_GCC_UNUSED int argc, AVA | ||
52 | printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL))); | ||
53 | printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6)); | ||
54 | |||
55 | + memset(rdata, 1, sizeof(rdata)); | ||
56 | + r = avahi_string_list_parse(rdata, sizeof(rdata), &txt); | ||
57 | + assert(r >= 0); | ||
58 | + assert(avahi_string_list_serialize(txt, NULL, 0) == sizeof(rdata)); | ||
59 | + error = avahi_entry_group_add_service_strlst(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", "_qotd._tcp", NULL, NULL, 123, txt); | ||
60 | + assert(error == AVAHI_ERR_INVALID_RECORD); | ||
61 | + avahi_string_list_free(txt); | ||
62 | + | ||
63 | avahi_entry_group_commit (group); | ||
64 | |||
65 | domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u"); | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38470.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch index 91f9e677ac..91f9e677ac 100644 --- a/meta/recipes-connectivity/avahi/files/CVE-2023-38470.patch +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch | |||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch new file mode 100644 index 0000000000..e0736bf210 --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 20dec84b2480821704258bc908e7b2bd2e883b24 Mon Sep 17 00:00:00 2001 | ||
2 | From: Evgeny Vereshchagin <evvers@ya.ru> | ||
3 | Date: Tue, 19 Sep 2023 03:21:25 +0000 | ||
4 | Subject: [PATCH] [common] bail out when escaped labels can't fit into ret | ||
5 | |||
6 | Fixes: | ||
7 | ``` | ||
8 | ==93410==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f9e76f14c16 at pc 0x00000047208d bp 0x7ffee90a6a00 sp 0x7ffee90a61c8 | ||
9 | READ of size 1110 at 0x7f9e76f14c16 thread T0 | ||
10 | #0 0x47208c in __interceptor_strlen (out/fuzz-domain+0x47208c) (BuildId: 731b20c1eef22c2104e75a6496a399b10cfc7cba) | ||
11 | #1 0x534eb0 in avahi_strdup avahi/avahi-common/malloc.c:167:12 | ||
12 | #2 0x53862c in avahi_normalize_name_strdup avahi/avahi-common/domain.c:226:12 | ||
13 | ``` | ||
14 | and | ||
15 | ``` | ||
16 | fuzz-domain: fuzz/fuzz-domain.c:38: int LLVMFuzzerTestOneInput(const uint8_t *, size_t): Assertion `avahi_domain_equal(s, t)' failed. | ||
17 | ==101571== ERROR: libFuzzer: deadly signal | ||
18 | #0 0x501175 in __sanitizer_print_stack_trace (/home/vagrant/avahi/out/fuzz-domain+0x501175) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8) | ||
19 | #1 0x45ad2c in fuzzer::PrintStackTrace() (/home/vagrant/avahi/out/fuzz-domain+0x45ad2c) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8) | ||
20 | #2 0x43fc07 in fuzzer::Fuzzer::CrashCallback() (/home/vagrant/avahi/out/fuzz-domain+0x43fc07) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8) | ||
21 | #3 0x7f1581d7ebaf (/lib64/libc.so.6+0x3dbaf) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
22 | #4 0x7f1581dcf883 in __pthread_kill_implementation (/lib64/libc.so.6+0x8e883) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
23 | #5 0x7f1581d7eafd in gsignal (/lib64/libc.so.6+0x3dafd) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
24 | #6 0x7f1581d6787e in abort (/lib64/libc.so.6+0x2687e) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
25 | #7 0x7f1581d6779a in __assert_fail_base.cold (/lib64/libc.so.6+0x2679a) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
26 | #8 0x7f1581d77186 in __assert_fail (/lib64/libc.so.6+0x36186) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
27 | #9 0x5344a4 in LLVMFuzzerTestOneInput /home/vagrant/avahi/fuzz/fuzz-domain.c:38:9 | ||
28 | ``` | ||
29 | |||
30 | It's a follow-up to 94cb6489114636940ac683515417990b55b5d66c | ||
31 | |||
32 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38470-2.patch?h=ubuntu/jammy-security | ||
33 | CVE: CVE-2023-38470 #Follow-up patch | ||
34 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
35 | --- | ||
36 | avahi-common/domain.c | 3 ++- | ||
37 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
38 | |||
39 | Index: avahi-0.8/avahi-common/domain.c | ||
40 | =================================================================== | ||
41 | --- avahi-0.8.orig/avahi-common/domain.c | ||
42 | +++ avahi-0.8/avahi-common/domain.c | ||
43 | @@ -210,7 +210,8 @@ char *avahi_normalize_name(const char *s | ||
44 | } else | ||
45 | empty = 0; | ||
46 | |||
47 | - avahi_escape_label(label, strlen(label), &r, &size); | ||
48 | + if (!(avahi_escape_label(label, strlen(label), &r, &size))) | ||
49 | + return NULL; | ||
50 | } | ||
51 | |||
52 | return ret_s; | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38471.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch index b3f716495d..b3f716495d 100644 --- a/meta/recipes-connectivity/avahi/files/CVE-2023-38471.patch +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch | |||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch new file mode 100644 index 0000000000..44737bfc2e --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From b675f70739f404342f7f78635d6e2dcd85a13460 Mon Sep 17 00:00:00 2001 | ||
2 | From: Evgeny Vereshchagin <evvers@ya.ru> | ||
3 | Date: Tue, 24 Oct 2023 22:04:51 +0000 | ||
4 | Subject: [PATCH] core: return errors from avahi_server_set_host_name properly | ||
5 | |||
6 | It's a follow-up to 894f085f402e023a98cbb6f5a3d117bd88d93b09 | ||
7 | |||
8 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-2.patch?h=ubuntu/jammy-security | ||
9 | Upstream commit https://github.com/lathiat/avahi/commit/b675f70739f404342f7f78635d6e2dcd85a13460] | ||
10 | CVE: CVE-2023-38471 #Follow-up Patch | ||
11 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
12 | --- | ||
13 | avahi-core/server.c | 9 ++++++--- | ||
14 | 1 file changed, 6 insertions(+), 3 deletions(-) | ||
15 | |||
16 | Index: avahi-0.8/avahi-core/server.c | ||
17 | =================================================================== | ||
18 | --- avahi-0.8.orig/avahi-core/server.c | ||
19 | +++ avahi-0.8/avahi-core/server.c | ||
20 | @@ -1309,10 +1309,13 @@ int avahi_server_set_host_name(AvahiServ | ||
21 | else | ||
22 | hn = avahi_normalize_name_strdup(host_name); | ||
23 | |||
24 | + if (!hn) | ||
25 | + return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY); | ||
26 | + | ||
27 | h = hn; | ||
28 | if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) { | ||
29 | avahi_free(h); | ||
30 | - return AVAHI_ERR_INVALID_HOST_NAME; | ||
31 | + return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME); | ||
32 | } | ||
33 | |||
34 | avahi_free(h); | ||
35 | @@ -1320,7 +1323,7 @@ int avahi_server_set_host_name(AvahiServ | ||
36 | h = label_escaped; | ||
37 | len = sizeof(label_escaped); | ||
38 | if (!avahi_escape_label(label, strlen(label), &h, &len)) | ||
39 | - return AVAHI_ERR_INVALID_HOST_NAME; | ||
40 | + return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME); | ||
41 | |||
42 | if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION) | ||
43 | return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE); | ||
44 | @@ -1330,7 +1333,7 @@ int avahi_server_set_host_name(AvahiServ | ||
45 | avahi_free(s->host_name); | ||
46 | s->host_name = avahi_strdup(label_escaped); | ||
47 | if (!s->host_name) | ||
48 | - return AVAHI_ERR_NO_MEMORY; | ||
49 | + return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY); | ||
50 | |||
51 | update_fqdn(s); | ||
52 | |||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch index a1de8e2a5a..85dbded73b 100644 --- a/meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch | |||
@@ -1,46 +1,46 @@ | |||
1 | From 8cf606779dc356768afc6b70e53f2808a9655143 Mon Sep 17 00:00:00 2001 | 1 | From b024ae5749f4aeba03478e6391687c3c9c8dee40 Mon Sep 17 00:00:00 2001 |
2 | From: Michal Sekletar <msekleta@redhat.com> | 2 | From: Michal Sekletar <msekleta@redhat.com> |
3 | Date: Thu, 19 Oct 2023 17:36:44 +0200 | 3 | Date: Thu, 19 Oct 2023 17:36:44 +0200 |
4 | Subject: [PATCH] avahi: core: make sure there is rdata to process before | 4 | Subject: [PATCH] core: make sure there is rdata to process before parsing it |
5 | parsing it | ||
6 | 5 | ||
7 | Fixes #452 | 6 | Fixes #452 |
8 | 7 | ||
9 | Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40] | 8 | CVE-2023-38472 |
10 | CVE: CVE-2023-38472 | ||
11 | 9 | ||
10 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38472.patch?h=ubuntu/jammy-security | ||
11 | Upstream commit https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40] | ||
12 | CVE: CVE-2023-38472 | ||
12 | Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com> | 13 | Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com> |
14 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
13 | --- | 15 | --- |
14 | avahi-client/client-test.c | 3 +++ | 16 | avahi-client/client-test.c | 3 +++ |
15 | avahi-daemon/dbus-entry-group.c | 2 +- | 17 | avahi-daemon/dbus-entry-group.c | 2 +- |
16 | 2 files changed, 4 insertions(+), 1 deletion(-) | 18 | 2 files changed, 4 insertions(+), 1 deletion(-) |
17 | 19 | ||
18 | diff --git a/avahi-client/client-test.c b/avahi-client/client-test.c | 20 | Index: avahi-0.8/avahi-client/client-test.c |
19 | index 7d04a6a..57750a4 100644 | 21 | =================================================================== |
20 | --- a/avahi-client/client-test.c | 22 | --- avahi-0.8.orig/avahi-client/client-test.c |
21 | +++ b/avahi-client/client-test.c | 23 | +++ avahi-0.8/avahi-client/client-test.c |
22 | @@ -258,6 +258,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { | 24 | @@ -272,6 +272,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA |
23 | printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL))); | 25 | assert(error == AVAHI_ERR_INVALID_RECORD); |
24 | printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6)); | 26 | avahi_string_list_free(txt); |
25 | 27 | ||
26 | + error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0); | 28 | + error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0); |
27 | + assert(error != AVAHI_OK); | 29 | + assert(error != AVAHI_OK); |
28 | + | 30 | + |
29 | avahi_entry_group_commit (group); | 31 | avahi_entry_group_commit (group); |
30 | 32 | ||
31 | domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u"); | 33 | domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u"); |
32 | diff --git a/avahi-daemon/dbus-entry-group.c b/avahi-daemon/dbus-entry-group.c | 34 | Index: avahi-0.8/avahi-daemon/dbus-entry-group.c |
33 | index 4e879a5..aa23d4b 100644 | 35 | =================================================================== |
34 | --- a/avahi-daemon/dbus-entry-group.c | 36 | --- avahi-0.8.orig/avahi-daemon/dbus-entry-group.c |
35 | +++ b/avahi-daemon/dbus-entry-group.c | 37 | +++ avahi-0.8/avahi-daemon/dbus-entry-group.c |
36 | @@ -340,7 +340,7 @@ DBusHandlerResult avahi_dbus_msg_entry_group_impl(DBusConnection *c, DBusMessage | 38 | @@ -340,7 +340,7 @@ DBusHandlerResult avahi_dbus_msg_entry_g |
37 | if (!(r = avahi_record_new_full (name, clazz, type, ttl))) | 39 | if (!(r = avahi_record_new_full (name, clazz, type, ttl))) |
38 | return avahi_dbus_respond_error(c, m, AVAHI_ERR_NO_MEMORY, NULL); | 40 | return avahi_dbus_respond_error(c, m, AVAHI_ERR_NO_MEMORY, NULL); |
39 | 41 | ||
40 | - if (avahi_rdata_parse (r, rdata, size) < 0) { | 42 | - if (avahi_rdata_parse (r, rdata, size) < 0) { |
41 | + if (!rdata || avahi_rdata_parse (r, rdata, size) < 0) { | 43 | + if (!rdata || avahi_rdata_parse (r, rdata, size) < 0) { |
42 | avahi_record_unref (r); | 44 | avahi_record_unref (r); |
43 | return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_RDATA, NULL); | 45 | return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_RDATA, NULL); |
44 | } | 46 | } |
45 | -- | ||
46 | 2.40.0 | ||