From 1d502761e41d3b776783993a4d0ea1b2e3baa7c1 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Thu, 27 May 2021 09:34:41 +0200 Subject: [PATCH 1/2] Fix for CVE-2021-25217 --- dhcp-statement_parser.patch | 30 ++++++++++++++++++++++++++++++ dhcp.spec | 6 +++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 dhcp-statement_parser.patch diff --git a/dhcp-statement_parser.patch b/dhcp-statement_parser.patch new file mode 100644 index 0000000..8e02a6f --- /dev/null +++ b/dhcp-statement_parser.patch @@ -0,0 +1,30 @@ +diff --git a/common/parse.c b/common/parse.c +index 386a6321..fc7b39c6 100644 +--- a/common/parse.c ++++ b/common/parse.c +@@ -3,7 +3,7 @@ + Common parser code for dhcpd and dhclient. */ + + /* +- * Copyright (c) 2004-2019 by Internet Systems Consortium, Inc. ("ISC") ++ * Copyright (c) 2004-2021 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 1995-2003 by Internet Software Consortium + * + * This Source Code Form is subject to the terms of the Mozilla Public +@@ -5556,13 +5556,14 @@ int parse_X (cfile, buf, max) + skip_to_semi (cfile); + return 0; + } +- convert_num (cfile, &buf [len], val, 16, 8); +- if (len++ > max) { ++ if (len >= max) { + parse_warn (cfile, + "hexadecimal constant too long."); + skip_to_semi (cfile); + return 0; + } ++ convert_num (cfile, &buf [len], val, 16, 8); ++ len++; + token = peek_token (&val, (unsigned *)0, cfile); + if (token == COLON) + token = next_token (&val, diff --git a/dhcp.spec b/dhcp.spec index 54b203f..677642a 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -15,7 +15,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.4.2 -Release: 8.b1%{?dist} +Release: 9.b1%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # dcantrell maintaining the package) made incorrect use of the epoch and @@ -61,6 +61,7 @@ Patch25 : 0025-bind-Detect-system-time-changes.patch Patch26 : 0026-Add-dhclient-5-B-option-description.patch Patch27: 0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch +Patch100: dhcp-statement_parser.patch @@ -525,6 +526,9 @@ done %endif %changelog +* Thu May 27 2021 Pavel Zhukov - 12:4.4.2-9.b1 +- Fix for CVE-2021-25217 + * Wed Jul 29 2020 Pavel Zhukov - 12:4.4.2-8.b1 - Fix IB patch (#1860689) From 2109e876f7bcc88c77434c7d2e280a11b466fc75 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Fri, 11 Jun 2021 09:56:19 +0200 Subject: [PATCH 2/2] Drop compat package finally --- dhcp.spec | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/dhcp.spec b/dhcp.spec index 677642a..d2868b0 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -15,7 +15,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.4.2 -Release: 9.b1%{?dist} +Release: 10.b1%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # dcantrell maintaining the package) made incorrect use of the epoch and @@ -128,19 +128,6 @@ easier to administer a large network. This package provides the ISC DHCP relay agent. -%package compat -Summary: Utility package to help transition -Provides: dhcp = %{epoch}:%{version}-%{release} -Obsoletes: dhcp < %{epoch}:%{version}-%{release} -Requires: %{name}-server = %{epoch}:%{version}-%{release} -Requires: %{name}-relay = %{epoch}:%{version}-%{release} - -%description compat -This package only exists to help transition dhcp users to the new -package split (dhcp -> dhcp & dhcrelay). -It will be removed after one distribution release cycle, please -do not reference it or depend on it in any way. - %package client Summary: Provides the ISC DHCP client daemon and dhclient-script Provides: dhclient = %{epoch}:%{version}-%{release} @@ -483,8 +470,6 @@ done %attr(0644,root,root) %{_unitdir}/dhcrelay.service %attr(0644,root,root) %{_mandir}/man8/dhcrelay.8.gz -%files compat - %files client %doc README.dhclient.d %doc client/dhclient.conf.example client/dhclient6.conf.example client/dhclient-enter-hooks @@ -526,6 +511,9 @@ done %endif %changelog +* Fri Jun 11 2021 Pavel Zhukov - 12:4.4.2-10.b1 +- Drop compat package finally + * Thu May 27 2021 Pavel Zhukov - 12:4.4.2-9.b1 - Fix for CVE-2021-25217