Accepting request 1121609 from GNOME:Factory
- Add avahi-CVE-2023-38470.patch: Ensure each label is at least one byte long (bsc#1215947, CVE-2023-38470). (forwarded request 1121540 from AZhou) OBS-URL: https://build.opensuse.org/request/show/1121609 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/avahi?expand=0&rev=161
This commit is contained in:
commit
6ed288bcb5
52
avahi-CVE-2023-38470.patch
Normal file
52
avahi-CVE-2023-38470.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
From b6cf29f98adce7355e8c51a6af1e338a5f94e16e Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||||
|
Date: Tue, 11 Apr 2023 15:29:59 +0200
|
||||||
|
Subject: [PATCH] Ensure each label is at least one byte long
|
||||||
|
|
||||||
|
The only allowed exception is single dot, where it should return empty
|
||||||
|
string.
|
||||||
|
|
||||||
|
Fixes #454.
|
||||||
|
---
|
||||||
|
avahi-common/domain-test.c | 14 ++++++++++++++
|
||||||
|
avahi-common/domain.c | 2 +-
|
||||||
|
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c
|
||||||
|
index cf763eca6..3acc1c1e4 100644
|
||||||
|
--- a/avahi-common/domain-test.c
|
||||||
|
+++ b/avahi-common/domain-test.c
|
||||||
|
@@ -45,6 +45,20 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) {
|
||||||
|
printf("%s\n", s = avahi_normalize_name_strdup("fo\\\\o\\..f oo."));
|
||||||
|
avahi_free(s);
|
||||||
|
|
||||||
|
+ printf("%s\n", s = avahi_normalize_name_strdup("."));
|
||||||
|
+ avahi_free(s);
|
||||||
|
+
|
||||||
|
+ s = avahi_normalize_name_strdup(",.=.}.=.?-.}.=.?.?.}.}.?.?.?.z.?.?.}.}."
|
||||||
|
+ "}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.}.}.}"
|
||||||
|
+ ".?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.?.zM.?`"
|
||||||
|
+ "?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}??.}.}.?.?."
|
||||||
|
+ "?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.?`?.}.}.}."
|
||||||
|
+ "??.?.zM.?`?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}?"
|
||||||
|
+ "?.}.}.?.?.?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM."
|
||||||
|
+ "?`?.}.}.}.?.?.?.r.=.=.?.?`.?.?}.}.}.?.?.?.r.=.?.}.=.?.?."
|
||||||
|
+ "}.?.?.?.}.=.?.?.}");
|
||||||
|
+ assert(s == NULL);
|
||||||
|
+
|
||||||
|
printf("%i\n", avahi_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff"));
|
||||||
|
printf("%i\n", avahi_domain_equal("A", "a"));
|
||||||
|
|
||||||
|
diff --git a/avahi-common/domain.c b/avahi-common/domain.c
|
||||||
|
index 3b1ab6834..e66d2416c 100644
|
||||||
|
--- a/avahi-common/domain.c
|
||||||
|
+++ b/avahi-common/domain.c
|
||||||
|
@@ -201,7 +201,7 @@ char *avahi_normalize_name(const char *s, char *ret_s, size_t size) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty) {
|
||||||
|
- if (size < 1)
|
||||||
|
+ if (size < 2)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
*(r++) = '.';
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 1 06:19:44 UTC 2023 - Alynx Zhou <alynx.zhou@suse.com>
|
||||||
|
|
||||||
|
- Add avahi-CVE-2023-38470.patch: Ensure each label is at least one
|
||||||
|
byte long (bsc#1215947, CVE-2023-38470).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 26 08:33:36 UTC 2023 - Xiaoguang Wang <xiaoguang.wang@suse.com>
|
Thu Oct 26 08:33:36 UTC 2023 - Xiaoguang Wang <xiaoguang.wang@suse.com>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package avahi
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -103,6 +103,8 @@ Patch29: harden_avahi-dnsconfd.service.patch
|
|||||||
Patch30: avahi-CVE-2023-1981.patch
|
Patch30: avahi-CVE-2023-1981.patch
|
||||||
# PATCH-FIX-UPSTREAM avahi-CVE-2023-38473.patch bsc#1216419 xwang@suse.com -- derive alternative host name from its unescaped version
|
# PATCH-FIX-UPSTREAM avahi-CVE-2023-38473.patch bsc#1216419 xwang@suse.com -- derive alternative host name from its unescaped version
|
||||||
Patch31: avahi-CVE-2023-38473.patch
|
Patch31: avahi-CVE-2023-38473.patch
|
||||||
|
# PATCH-FIX-UPSTREAM avahi-CVE-2023-38470.patch bsc#1215947 alynx.zhou@suse.com -- Ensure each label is at least one byte long
|
||||||
|
Patch32: avahi-CVE-2023-38470.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gdbm-devel
|
BuildRequires: gdbm-devel
|
||||||
@ -507,6 +509,7 @@ cp -a %{SOURCE12} service-type-database/build-db
|
|||||||
%patch29 -p1
|
%patch29 -p1
|
||||||
%patch30 -p1
|
%patch30 -p1
|
||||||
%patch31 -p1
|
%patch31 -p1
|
||||||
|
%patch32 -p1
|
||||||
|
|
||||||
%if !%{build_core}
|
%if !%{build_core}
|
||||||
# Replace all .la references from local .la files to installed versions
|
# Replace all .la references from local .la files to installed versions
|
||||||
|
Loading…
Reference in New Issue
Block a user