Accepting request 977464 from home:marxin:branches:network

- Add upstream patch bind-prevent-buffer-overflow.patch.

OBS-URL: https://build.opensuse.org/request/show/977464
OBS-URL: https://build.opensuse.org/package/show/network/bind?expand=0&rev=341
This commit is contained in:
Marcus Meissner 2022-05-16 08:27:30 +00:00 committed by Git OBS Bridge
parent 9fc32bb7e7
commit d16c91b060
3 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From 921043b54161c7a3e6dc4036b038ca4dbc5fe472 Mon Sep 17 00:00:00 2001
From: Evan Hunt <each@isc.org>
Date: Fri, 13 May 2022 19:59:58 -0700
Subject: [PATCH] prevent a possible buffer overflow in configuration check
corrected code that could have allowed a buffer overfow while
parsing named.conf.
---
lib/bind9/check.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bind9/check.c b/lib/bind9/check.c
index 658daec76d..baacd29a84 100644
--- a/lib/bind9/check.c
+++ b/lib/bind9/check.c
@@ -3009,8 +3009,8 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
} else if (dns_name_isula(zname)) {
ula = true;
}
- tmp += strlen(tmp);
len -= strlen(tmp);
+ tmp += strlen(tmp);
(void)snprintf(tmp, len, "%u/%s", zclass,
(ztype == CFG_ZONE_INVIEW) ? target
: (viewname != NULL) ? viewname
@@ -3719,8 +3719,8 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
char *tmp = keydirbuf;
size_t len = sizeof(keydirbuf);
dns_name_format(zname, keydirbuf, sizeof(keydirbuf));
- tmp += strlen(tmp);
len -= strlen(tmp);
+ tmp += strlen(tmp);
(void)snprintf(tmp, len, "/%s", (dir == NULL) ? "(null)" : dir);
tresult = keydirexist(zconfig, (const char *)keydirbuf,
kaspname, keydirs, logctx, mctx);
--
GitLab

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon May 16 08:14:55 UTC 2022 - Martin Liška <mliska@suse.cz>
- Add upstream patch bind-prevent-buffer-overflow.patch.
-------------------------------------------------------------------
Mon Apr 25 06:56:58 UTC 2022 - Josef Möllers <josef.moellers@suse.com>

View File

@ -76,6 +76,7 @@ Source70: bind.conf
Source72: named.conf
Patch56: bind-ldapdump-use-valid-host.patch
Patch57: bind-define-local-instances-of-FALLTHROUGH-and-UNREACHABLE.patch
Patch58: bind-prevent-buffer-overflow.patch
BuildRequires: libcap-devel
BuildRequires: libopenssl-devel
BuildRequires: libtool
@ -423,6 +424,7 @@ rm -rf %{buildroot}/usr/share/doc/packages/bind/misc/.libs
%pre -f named.pre
%service_add_pre named.service
%else
%pre
%{GROUPADD_NAMED}
%{USERADD_NAMED}