SHA256
1
0
forked from pool/dhcp
dhcp/dhcp-4.2.3-P1-dhclient-option_param-a.diff
Marius Tomaschewski a66d02d4db - Updated to ISC dhcp-4.2.3-P2 release, providing a DDNS security fix:
Modify the DDNS handling code. In a previous patch we added logging
  code to the DDNS handling.  This code included a bug that caused it
  to attempt to dereference a NULL pointer and eventually segfault.
  While reviewing the code as we addressed this problem, we determined
  that some of the updates to the lease structures would not work as
  planned since the structures being updated were in the process of
  being freed: these updates were removed.  In addition we removed an
  incorrect call to the DDNS removal function that could cause a failure
  during the removal of DDNS information from the DNS server.
  Thanks to Jasper Jongmans for reporting this issue.
  ([ISC-Bugs #27078], CVE: CVE-2011-4868, bnc#741239)
- Fixed close-on-exec patch to not set it on stderr (bnc#732910)
- Fixed incorrect "a" array type option parsing causing to discard
  e.g. classless static routes from lease file [reported as ISC-Bug
  27289] and zero-length option parsing such as dhcp6.rapid-commit
  in dhclient6 [reported as ISC-Bug 27314] (bnc#739696).
- Fixed dhclient to include its pid number in syslog messages.
- Fixed to use P2 in the spec version, not in the release tag.

OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=85
2012-01-16 17:05:05 +00:00

42 lines
1.4 KiB
Diff

From 3e3874a4e322536a683d2c22602c6c1a3f39df8e Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.de>
Date: Thu, 5 Jan 2012 16:20:42 +0100
Subject: [PATCH] dhclient: parse_option_param: Bad format a
When the server provides options using the "a" array type, such as:
option rfc3442-classless-routes code 121 = array of unsigned integer 8;
the option is stored into the lease file, but when the client reads the
lease file next time, it complains about, because "a" array type aren't
recognized in the parsing loop and the option (lease?) discarded.
Signed-off-by: Marius Tomaschewski <mt@suse.de>
---
common/parse.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/parse.c b/common/parse.c
index 61488c1..0fca63c 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -5518,7 +5518,7 @@ int parse_option_decl (oc, cfile)
/* Parse the option data... */
do {
for (fmt = option -> format; *fmt; fmt++) {
- if (*fmt == 'A')
+ if (*fmt == 'A' || *fmt == 'a')
break;
if (*fmt == 'o' && fmt != option -> format)
continue;
@@ -5732,7 +5732,7 @@ int parse_option_decl (oc, cfile)
}
}
token = next_token (&val, (unsigned *)0, cfile);
- } while (*fmt == 'A' && token == COMMA);
+ } while ((*fmt == 'A' || *fmt == 'a') && token == COMMA);
if (token != SEMI) {
parse_warn (cfile, "semicolon expected.");
--
1.7.7