diff --git a/backport-check-before-use-daemon-shm_info.patch b/backport-check-before-use-daemon-shm_info.patch new file mode 100644 index 0000000000000000000000000000000000000000..0e61e6cee8e3703961e3197b266b181b52777e50 --- /dev/null +++ b/backport-check-before-use-daemon-shm_info.patch @@ -0,0 +1,27 @@ +From 073c7301ebdf7511320ec817ad7ecacf6b45c4be Mon Sep 17 00:00:00 2001 +From: eaglegai <31752768+eaglegai@users.noreply.github.com> +Date: Tue, 21 Jan 2025 22:47:51 +0800 +Subject: [PATCH] check before use daemon->shm_info (#1229) + +fix core after the command `unbound-control stop unbound` + +fix:https://github.com/NLnetLabs/unbound/issues/1228 + +Signed-off-by: eaglegai +--- + util/shm_side/shm_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util/shm_side/shm_main.c b/util/shm_side/shm_main.c +index 6fd1f5ea6..751d6d649 100644 +--- a/util/shm_side/shm_main.c ++++ b/util/shm_side/shm_main.c +@@ -195,7 +195,7 @@ void shm_main_shutdown(struct daemon* daemon) + { + #ifdef HAVE_SHMGET + /* web are OK, just disabled */ +- if(!daemon->cfg->shm_enable) ++ if(!daemon->cfg->shm_enable || !daemon->shm_info) + return; + + verbose(VERB_DETAIL, "SHM shutdown - KEY [%d] - ID CTL [%d] ARR [%d] - PTR CTL [%p] ARR [%p]", diff --git a/unbound.spec b/unbound.spec index dd39af61a3dbd8dab6a6c38472631ed2c66ed487..44b66a278c2dfeab81a5acd3735b48c0978e2365 100644 --- a/unbound.spec +++ b/unbound.spec @@ -2,7 +2,7 @@ Name: unbound Version: 1.11.0 -Release: 16 +Release: 17 Summary: Unbound is a validating, recursive, caching DNS resolver License: BSD Url: https://nlnetlabs.nl/projects/unbound/about/ @@ -37,6 +37,7 @@ Patch12: backport-003-CVE-2024-43168.patch Patch13: backport-004-CVE-2024-43168.patch Patch14: backport-CVE-2024-33655.patch Patch15: backport-CVE-2024-8508.patch +Patch16: backport-check-before-use-daemon-shm_info.patch BuildRequires: make byacc flex swig pkgconfig systemd python-unversioned-command BuildRequires: libevent-devel expat-devel openssl-devel python3-devel @@ -239,6 +240,12 @@ popd %{_mandir}/man* %changelog +* Thu Jan 23 2025 gaihuiying - 1.11.0-17 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:backport upstream to add check to fix coredump + * Wed Oct 16 2024 gaihuiying - 1.11.0-16 - Type:cves - CVE:CVE-2024-8508