From b73f479ea459b1a5e4b3d699cf944cb44aba2a03 Mon Sep 17 00:00:00 2001 From: Noah Meyerhans Date: Sun, 22 Mar 2020 10:09:20 -0700 Subject: [PATCH 1/4] bind9: update to 9.16.1 Add libuv dependency Fix optional libxml and c-json dependency handling Signed-off-by: Noah Meyerhans (cherry picked from commit 72654d20d50abcf8f7987cc052890ada4f15a3c5) --- net/bind/Makefile | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/net/bind/Makefile b/net/bind/Makefile index 6b5abaf2d..a5ba7846b 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -1,6 +1,6 @@ # # Copyright (C) 2006-2012 OpenWrt.org -# 2014-2017 Noah Meyerhans +# 2014-2020 Noah Meyerhans # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bind -PKG_VERSION:=9.14.12 +PKG_VERSION:=9.16.1 PKG_RELEASE:=1 USERID:=bind=57:bind=57 @@ -18,11 +18,11 @@ PKG_LICENSE:=MPL-2.0 PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:isc:bind -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:= \ https://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \ https://ftp.isc.org/isc/bind9/$(PKG_VERSION) -PKG_HASH:=9c4de493bf7dfaa68b0273135369601d474175ab504ab572ffbb42a6db6ef4c8 +PKG_HASH:=a913d7e78135b9123d233215b58102fa0f18130fb1e158465a1c2b6f3bd75e91 PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=aclocal.m4 libtool.m4 @@ -35,12 +35,7 @@ PKG_CONFIG_DEPENDS := \ CONFIG_BIND_LIBJSON \ CONFIG_BIND_LIBXML2 -ifdef CONFIG_BIND_LIBXML2 - PKG_BUILD_DEPENDS += libxml2 -endif -ifdef CONFIG_BIND_LIBJSON - PKG_BUILD_DEPENDS += libjson-c -endif +PKG_BUILD_DEPENDS += BIND_LIBXML2:libxml2 BIND_LIBJSON:libjson-c include $(INCLUDE_DIR)/package.mk @@ -56,15 +51,10 @@ endef define Package/bind-libs SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libopenssl +zlib +libpthread +libatomic + DEPENDS:=+libopenssl +zlib +libpthread +libatomic +libuv \ + +BIND_LIBXML2:libxml2 +BIND_LIBJSON:libjson-c TITLE:=bind shared libraries URL:=https://www.isc.org/software/bind -ifdef CONFIG_BIND_LIBJSON - DEPENDS+= +libjson-c -endif -ifdef CONFIG_BIND_LIBXML2 - DEPENDS+= +libxml2 -endif endef define Package/bind-server @@ -78,7 +68,7 @@ endef define Package/bind-server-filter-aaaa $(call Package/bind-server) - DEPENDS:=+bind-server + DEPENDS:=bind-server TITLE+= filter AAAA plugin endef @@ -139,19 +129,20 @@ CONFIGURE_ARGS += \ --sysconfdir=/etc/bind ifdef CONFIG_BIND_LIBJSON + TARGET_CFLAGS += -DHAVE_JSON_C -UHAVE_JSON CONFIGURE_ARGS += \ - --with-libjson="$(STAGING_DIR)/usr" + --with-json-c=yes else CONFIGURE_ARGS += \ - --without-libjson + --with-json-c=no endif ifdef CONFIG_BIND_LIBXML2 CONFIGURE_ARGS += \ - --with-libxml2="$(STAGING_DIR)/usr" + --with-libxml2=yes else CONFIGURE_ARGS += \ - --without-libxml2 + --with-libxml2=no endif CONFIGURE_VARS += \ From 177623c5feb61d5f0961ca6ff6ee5bfffe7a81e5 Mon Sep 17 00:00:00 2001 From: Jan Pavlinec Date: Thu, 30 Apr 2020 11:39:38 +0200 Subject: [PATCH 2/4] bind: update to version (security fix) Signed-off-by: Jan Pavlinec (cherry picked from commit c8be44062e7bca64f70d8975d9130b81a1f6cabb) --- net/bind/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bind/Makefile b/net/bind/Makefile index a5ba7846b..ad8e7e863 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bind -PKG_VERSION:=9.16.1 +PKG_VERSION:=9.16.2 PKG_RELEASE:=1 USERID:=bind=57:bind=57 @@ -22,7 +22,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:= \ https://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \ https://ftp.isc.org/isc/bind9/$(PKG_VERSION) -PKG_HASH:=a913d7e78135b9123d233215b58102fa0f18130fb1e158465a1c2b6f3bd75e91 +PKG_HASH:=d9e5b77cfca5ccad97f19cddc87128758ec15c16e6585000c6b2f84fc225993f PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=aclocal.m4 libtool.m4 From 3c3a1f7618cd61c18656c4793974e2fb8033085c Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Tue, 19 May 2020 12:11:53 +0200 Subject: [PATCH 3/4] bind: update to version 9.16.3 Fixes: CVE-2020-8616 CVE-2020-8617 Signed-off-by: Josef Schlehofer (cherry picked from commit a75391575b268b379e6bc552b703dc17a76f402f) --- net/bind/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bind/Makefile b/net/bind/Makefile index ad8e7e863..8726baa28 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bind -PKG_VERSION:=9.16.2 +PKG_VERSION:=9.16.3 PKG_RELEASE:=1 USERID:=bind=57:bind=57 @@ -22,7 +22,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:= \ https://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION) \ https://ftp.isc.org/isc/bind9/$(PKG_VERSION) -PKG_HASH:=d9e5b77cfca5ccad97f19cddc87128758ec15c16e6585000c6b2f84fc225993f +PKG_HASH:=27ac6513de5f8d0db34b9f241da53baa15a14b2ad21338d0cde0826eaf564f7e PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=aclocal.m4 libtool.m4 From b80db2c8004fd730ca22c8ac68a84cacb9c0bf65 Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Tue, 26 May 2020 16:48:52 +0100 Subject: [PATCH 4/4] bind: add nslookup alternative to busybox nslookup Add alternative to busybox nslookup. Busybox throws an error when the host does not have an AAAA record. Signed-off-by: Ian Cooper (cherry picked from commit 4cb5aa57fddb83e340cfadcfbeb93a7e340ce724) --- net/bind/Makefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/net/bind/Makefile b/net/bind/Makefile index 8726baa28..d114e5869 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bind PKG_VERSION:=9.16.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 USERID:=bind=57:bind=57 PKG_MAINTAINER:=Noah Meyerhans @@ -83,6 +83,7 @@ define Package/bind-tools DEPENDS:= \ +bind-check \ +bind-dig \ + +bind-nslookup \ +bind-dnssec \ +bind-host \ +bind-rndc @@ -113,6 +114,13 @@ define Package/bind-dig TITLE+= DNS excavation tool endef +define Package/bind-nslookup + $(call Package/bind/Default) + TITLE+= nslookup utility + ALTERNATIVES:= \ + 200:/usr/bin/nslookup:/usr/libexec/nslookup-bind +endef + export BUILD_CC="$(TARGET_CC)" TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed @@ -234,6 +242,11 @@ define Package/bind-dig/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/ endef +define Package/bind-nslookup/install + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nslookup $(1)/usr/libexec/nslookup-bind +endef + $(eval $(call BuildPackage,bind-libs)) $(eval $(call BuildPackage,bind-server)) $(eval $(call BuildPackage,bind-server-filter-aaaa)) @@ -244,3 +257,4 @@ $(eval $(call BuildPackage,bind-check)) $(eval $(call BuildPackage,bind-dnssec)) $(eval $(call BuildPackage,bind-host)) $(eval $(call BuildPackage,bind-dig)) +$(eval $(call BuildPackage,bind-nslookup))