diff --git a/backport-Fix-610-Undefine-shift-in-sldns_str2wire_hip_buf.patch b/backport-Fix-610-Undefine-shift-in-sldns_str2wire_hip_buf.patch new file mode 100644 index 0000000000000000000000000000000000000000..3864192cf0c9fe37c7f0e740264c207d933c566c --- /dev/null +++ b/backport-Fix-610-Undefine-shift-in-sldns_str2wire_hip_buf.patch @@ -0,0 +1,42 @@ +From 12a1053dfa9f978d875402456c2c836140e9ad47 Mon Sep 17 00:00:00 2001 +From: "W.C.A. Wijngaards" +Date: Tue, 25 Jan 2022 08:57:49 +0100 +Subject: [PATCH] - Fix #610: Undefine-shift in sldns_str2wire_hip_buf. + +--- + sldns/str2wire.c | 4 +++- + sldns/str2wire.h | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/sldns/str2wire.c b/sldns/str2wire.c +index 977cda2..bb7aacc 100644 +--- a/sldns/str2wire.c ++++ b/sldns/str2wire.c +@@ -25,8 +25,10 @@ + #include + #endif + ++/** bits for the offset */ ++#define RET_OFFSET_MASK (((unsigned)(~LDNS_WIREPARSE_MASK))>>LDNS_WIREPARSE_SHIFT) + /** return an error */ +-#define RET_ERR(e, off) ((int)((e)|((off)<>LDNS_WIREPARSE_SHIFT) ++#define LDNS_WIREPARSE_OFFSET(e) ((((unsigned)(e))&~LDNS_WIREPARSE_MASK)>>LDNS_WIREPARSE_SHIFT) + /* use lookuptable to get error string, sldns_wireparse_errors */ + #define LDNS_WIREPARSE_ERR_OK 0 + #define LDNS_WIREPARSE_ERR_GENERAL 342 +-- +1.8.3.1 + diff --git a/unbound.spec b/unbound.spec index dd3ea307f14a5c7757cb54f564789fefae1c1d04..0e260a91627cdf115eac67139c01e43ad9b8334f 100644 --- a/unbound.spec +++ b/unbound.spec @@ -2,7 +2,7 @@ Name: unbound Version: 1.11.0 -Release: 3 +Release: 4 Summary: Unbound is a validating, recursive, caching DNS resolver License: BSD Url: https://nlnetlabs.nl/projects/unbound/about/ @@ -24,6 +24,7 @@ Source13: unbound-anchor.service Patch0: CVE-2020-28935.patch Patch6000: unbound-remove-buildin-key.patch +Patch6001: backport-Fix-610-Undefine-shift-in-sldns_str2wire_hip_buf.patch BuildRequires: make flex swig pkgconfig systemd python-unversioned-command BuildRequires: libevent-devel expat-devel openssl-devel python3-devel @@ -71,12 +72,10 @@ Package help includes includes man pages for unbound. %prep -%setup -qcn %{name}-%{version} +%autosetup -c -N -n %{name}-%{version} pushd %{name}-%{version} - -%patch0 -p1 -%patch6000 -p1 +%autopatch -p1 cp -pr doc pythonmod libunbound ../ popd @@ -232,6 +231,12 @@ popd %{_mandir}/man* %changelog +* Tue Jan 25 2022 jiangheng - 1.11.0-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix Undefine-shift in sldns_str2wire_hip_buf + * Thu Dec 02 2021 xihaochen - 1.11.0-3 - Type:bugfix - ID:NA