-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f45852
commit 6f7f170
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From c89fd5f2e85052f1f8b74ddeff38235932236889 Mon Sep 17 00:00:00 2001 | ||
From: Kanishk-Bansal <kbkanishk975@gmail.com> | ||
Date: Wed, 27 Nov 2024 08:48:59 +0000 | ||
Subject: [PATCH] Fix CVE patch | ||
|
||
--- | ||
avahi-core/rr.c | 9 ++++++++- | ||
1 file changed, 8 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/avahi-core/rr.c b/avahi-core/rr.c | ||
index 7fa0bee..b03a24c 100644 | ||
--- a/avahi-core/rr.c | ||
+++ b/avahi-core/rr.c | ||
@@ -32,6 +32,7 @@ | ||
#include <avahi-common/malloc.h> | ||
#include <avahi-common/defs.h> | ||
|
||
+#include "dns.h" | ||
#include "rr.h" | ||
#include "log.h" | ||
#include "util.h" | ||
@@ -688,11 +689,17 @@ int avahi_record_is_valid(AvahiRecord *r) { | ||
case AVAHI_DNS_TYPE_TXT: { | ||
|
||
AvahiStringList *strlst; | ||
+ size_t used = 0; | ||
|
||
- for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) | ||
+ for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) { | ||
if (strlst->size > 255 || strlst->size <= 0) | ||
return 0; | ||
|
||
+ used += 1+strlst->size; | ||
+ if (used > AVAHI_DNS_RDATA_MAX) | ||
+ return 0; | ||
+ } | ||
+ | ||
return 1; | ||
} | ||
} | ||
-- | ||
2.45.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters