Fix for CVE-2021-25217

This commit is contained in:
Pavel Zhukov 2021-05-27 09:34:41 +02:00
parent b7f08e9d5c
commit 8aeac5698d
2 changed files with 35 additions and 1 deletions

View File

@ -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,

View File

@ -15,7 +15,7 @@
Summary: Dynamic host configuration protocol software Summary: Dynamic host configuration protocol software
Name: dhcp Name: dhcp
Version: 4.4.2 Version: 4.4.2
Release: 10.b1%{?dist} Release: 11.b1%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and # 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 Patch26 : 0026-Add-dhclient-5-B-option-description.patch
Patch27: 0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch Patch27: 0027-Add-missed-sd-notify-patch-to-manage-dhcpd-with-syst.patch
Patch100: dhcp-statement_parser.patch
@ -526,6 +527,9 @@ done
%endif %endif
%changelog %changelog
* Thu May 27 2021 Pavel Zhukov <pzhukov@redhat.com> - 12:4.4.2-11.b1
- Fix for CVE-2021-25217
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 12:4.4.2-10.b1 * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 12:4.4.2-10.b1
- Rebuilt for updated systemd-rpm-macros - Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583. See https://pagure.io/fesco/issue/2583.