summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/avahi
diff options
context:
space:
mode:
authorMeenali Gupta <meenali.gupta@windriver.com>2023-11-16 11:17:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-20 15:30:52 +0000
commit4dd9e54a3b230bd542284a451905cb5203effa84 (patch)
treee2faa791de1c135ab173de81f1a5dbc9d1babad7 /meta/recipes-connectivity/avahi
parent93a9621df356f4a2ce7c516c191de0571c4661de (diff)
downloadpoky-4dd9e54a3b230bd542284a451905cb5203effa84.tar.gz
avahi: fix CVE-2023-38469
A vulnerability was found in Avahi, where a reachable assertion exists in avahi_dns_packet_append_record. (From OE-Core rev: 885d64f067b9ddaf890d9bdef7b76898ff90b04e) Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/avahi')
-rw-r--r--meta/recipes-connectivity/avahi/avahi_0.8.bb1
-rw-r--r--meta/recipes-connectivity/avahi/files/CVE-2023-38469.patch48
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi_0.8.bb b/meta/recipes-connectivity/avahi/avahi_0.8.bb
index 4c830cc058..90b33ba81b 100644
--- a/meta/recipes-connectivity/avahi/avahi_0.8.bb
+++ b/meta/recipes-connectivity/avahi/avahi_0.8.bb
@@ -26,6 +26,7 @@ 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 " 30 "
30 31
31GITHUB_BASE_URI = "https://github.com/lathiat/avahi/releases/" 32GITHUB_BASE_URI = "https://github.com/lathiat/avahi/releases/"
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38469.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38469.patch
new file mode 100644
index 0000000000..a078f66102
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38469.patch
@@ -0,0 +1,48 @@
1From 72842945085cc3adaccfdfa2853771b0e75ef991 Mon Sep 17 00:00:00 2001
2From: Evgeny Vereshchagin <evvers@ya.ru>
3Date: Mon, 23 Oct 2023 20:29:31 +0000
4Subject: [PATCH] avahi: core: reject overly long TXT resource records
5
6Closes https://github.com/lathiat/avahi/issues/455
7
8Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/a337a1ba7d15853fb56deef1f464529af6e3a1cf]
9CVE: CVE-2023-38469
10
11Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
12---
13 avahi-core/rr.c | 9 ++++++++-
14 1 file changed, 8 insertions(+), 1 deletion(-)
15
16diff --git a/avahi-core/rr.c b/avahi-core/rr.c
17index 7fa0bee..b03a24c 100644
18--- a/avahi-core/rr.c
19+++ b/avahi-core/rr.c
20@@ -32,6 +32,7 @@
21 #include <avahi-common/malloc.h>
22 #include <avahi-common/defs.h>
23
24+#include "dns.h"
25 #include "rr.h"
26 #include "log.h"
27 #include "util.h"
28@@ -688,11 +689,17 @@ int avahi_record_is_valid(AvahiRecord *r) {
29 case AVAHI_DNS_TYPE_TXT: {
30
31 AvahiStringList *strlst;
32+ size_t used = 0;
33
34- for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next)
35+ for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) {
36 if (strlst->size > 255 || strlst->size <= 0)
37 return 0;
38
39+ used += 1+strlst->size;
40+ if (used > AVAHI_DNS_RDATA_MAX)
41+ return 0;
42+ }
43+
44 return 1;
45 }
46 }
47--
482.40.0