Disable the internale memory allocator by default

(cherry picked from commit c480297f9ca43a74e931870362043264157651bd)
This commit is contained in:
chengyechun 2023-09-04 11:40:11 +08:00 committed by openeuler-sync-bot
parent d013c0cd65
commit 8d40c29445
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,41 @@
From 1f7d2d53f0e5b86e22e1dd116868bb69eeacb1a0 Mon Sep 17 00:00:00 2001
From: Ondrej Sur <oerdnj@isc-projects>
Date: Wed, 15 Dec 2021 08:25:29 PM GMT+0800
Subject: [PATCH] Disable the internale memory allocator by default
Conflict:NA
Reference:https://githun.com/isc-projects/bind9/commit/1f7d2d53f0e5b86e22e1dd116868bb69eeacb1a0
---
bin/named/main.c | 1 +
lib/isc/include/isc/mem.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/bin/named/main.c b/bin/named/main.c
index f62f82c..b3d2498 100644
--- a/bin/named/main.c
+++ b/bin/named/main.c
@@ -456,6 +456,7 @@ static struct flag_def {
{ "mctx", ISC_MEM_DEBUGCTX, false },
{ NULL, 0, false } },
mem_context_flags[] = { { "external", ISC_MEMFLAG_INTERNAL, true },
+ { "internal", ISC_MEMFLAG_INTERNAL, false },
{ "fill", ISC_MEMFLAG_FILL, false },
{ "nofill", ISC_MEMFLAG_FILL, true },
{ NULL, 0, false } };
diff --git a/lib/isc/include/isc/mem.h b/lib/isc/include/isc/mem.h
index 58e1d0e..b9f58fa 100644
--- a/lib/isc/include/isc/mem.h
+++ b/lib/isc/include/isc/mem.h
@@ -117,7 +117,7 @@ LIBISC_EXTERNAL_DATA extern unsigned int isc_mem_defaultflags;
*/
#if !defined(ISC_MEM_USE_INTERNAL_MALLOC) && !__SANITIZE_ADDRESS__
-#define ISC_MEM_USE_INTERNAL_MALLOC 1
+#define ISC_MEM_USE_INTERNAL_MALLOC 0
#endif /* ifndef ISC_MEM_USE_INTERNAL_MALLOC */
/*
--
2.23.0

View File

@ -30,7 +30,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: MPLv2.0
Version: 9.16.23
Release: 18
Release: 19
Epoch: 32
Url: https://www.isc.org/downloads/bind/
#
@ -207,6 +207,7 @@ Patch6124:backport-Fix-view-s-zones-reverting-bug-during-reconfiguration.patch
Patch6125:backport-CVE-2023-2911.patch
Patch6126:backport-CVE-2023-2828.patch
Patch6127:backport-Disable-the-internale-memory-allocator-by-default.patch
Patch9000:bugfix-limit-numbers-of-test-threads.patch
@ -1216,6 +1217,12 @@ fi;
%endif
%changelog
* Mon Sep 04 2023 chengyechun <chengyechun1@huawei.com> - 32:9.16.23-19
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:Disable the internal memory allocator by default
* Mon Jun 26 2023 zhanghao <zhanghao383@huawei.com> - 32:9.16.23-18
- Type:CVE
- CVE:CVE-2023-2911 CVE-2023-2828