Skip to content

Commit f871a79

Browse files
Add patch for CVE-2024-43168 in unbound (#10157)
1 parent bb4e1dc commit f871a79

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

SPECS/unbound/CVE-2024-43168.patch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 193401e7543a1e561dd634a3eaae932fa462a2b9 Mon Sep 17 00:00:00 2001
2+
From: zhailiangliang <zhailiangliang@loongson.cn>
3+
Date: Wed, 3 Apr 2024 15:40:58 +0800
4+
Subject: [PATCH] fix heap-buffer-overflow issue in function cfg_mark_ports of
5+
file util/config_file.c
6+
7+
---
8+
util/config_file.c | 4 ++++
9+
1 file changed, 4 insertions(+)
10+
11+
diff --git a/util/config_file.c b/util/config_file.c
12+
index 26185da02..e7b2f1959 100644
13+
--- a/util/config_file.c
14+
+++ b/util/config_file.c
15+
@@ -1761,6 +1761,10 @@ cfg_mark_ports(const char* str, int allow, int* avail, int num)
16+
#endif
17+
if(!mid) {
18+
int port = atoi(str);
19+
+ if(port < 0) {
20+
+ log_err("Prevent out-of-bounds access to array avail");
21+
+ return 0;
22+
+ }
23+
if(port == 0 && strcmp(str, "0") != 0) {
24+
log_err("cannot parse port number '%s'", str);
25+
return 0;

SPECS/unbound/unbound.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
Summary: unbound dns server
22
Name: unbound
33
Version: 1.19.1
4-
Release: 1%{?dist}
4+
Release: 2%{?dist}
55
License: BSD
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
88
Group: System/Servers
99
URL: https://nlnetlabs.nl/projects/unbound/about/
1010
Source0: https://github.com/nlnetlabs/%{name}/archive/release-%{version}.tar.gz#/%{name}-release-%{version}.tar.gz
1111
Source1: %{name}.service
12+
Patch0: CVE-2024-43168.patch
1213
BuildRequires: expat-devel
1314
BuildRequires: libevent-devel
1415
BuildRequires: python3-devel
@@ -96,6 +97,9 @@ useradd -r -g unbound -d %{_sysconfdir}/unbound -s /sbin/nologin \
9697
%{_mandir}/*
9798

9899
%changelog
100+
* Thu Aug 15 2024 Aadhar Agarwal <aadagarwal@microsoft.com> - 1.19.1-2
101+
- Add patch to fix CVE-2024-43168
102+
99103
* Wed Feb 28 2024 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 1.19.1-1
100104
- Auto-upgrade to 1.19.1 - Fix CVE-2023-50387
101105

0 commit comments

Comments
 (0)