From 1117842dc4eecd4db2bed6538a9b8604c6049972 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 1 Oct 2012 15:36:29 -0600 Subject: [PATCH] - Set proper max length when parsing xdr requests (#848748). --- glibc-rh848748.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++ glibc.spec | 7 +++++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 glibc-rh848748.patch diff --git a/glibc-rh848748.patch b/glibc-rh848748.patch new file mode 100644 index 0000000..149cf5f --- /dev/null +++ b/glibc-rh848748.patch @@ -0,0 +1,56 @@ +2012-10-01 Patsy Franklin + Honza Horak + + * nis/yp_xdr.c (xdr_domainname): Use YPMAXDOMAIN as maxsize. + (xdr_mapname): Use YPMAXMAP as maxsize. + (xdr_peername): Use YPMAXPEER as maxsize. + (xdr_keydat): Use YPAXRECORD as maxsize. + (xdr_valdat): Use YPMAXRECORD as maxsize. + +diff --git a/nis/yp_xdr.c b/nis/yp_xdr.c +index 76e0f2f..4188506 100644 +--- a/nis/yp_xdr.c ++++ b/nis/yp_xdr.c +@@ -49,21 +49,21 @@ libnsl_hidden_def (xdr_ypxfrstat) + bool_t + xdr_domainname (XDR *xdrs, domainname *objp) + { +- return xdr_string (xdrs, objp, ~0); ++ return xdr_string (xdrs, objp, YPMAXDOMAIN); + } + libnsl_hidden_def (xdr_domainname) + + bool_t + xdr_mapname (XDR *xdrs, mapname *objp) + { +- return xdr_string (xdrs, objp, ~0); ++ return xdr_string (xdrs, objp, YPMAXMAP); + } + libnsl_hidden_def (xdr_mapname) + + bool_t + xdr_peername (XDR *xdrs, peername *objp) + { +- return xdr_string (xdrs, objp, ~0); ++ return xdr_string (xdrs, objp, YPMAXPEER); + } + libnsl_hidden_def (xdr_peername) + +@@ -71,7 +71,7 @@ bool_t + xdr_keydat (XDR *xdrs, keydat *objp) + { + return xdr_bytes (xdrs, (char **) &objp->keydat_val, +- (u_int *) &objp->keydat_len, ~0); ++ (u_int *) &objp->keydat_len, YPMAXRECORD); + } + libnsl_hidden_def (xdr_keydat) + +@@ -79,7 +79,7 @@ bool_t + xdr_valdat (XDR *xdrs, valdat *objp) + { + return xdr_bytes (xdrs, (char **) &objp->valdat_val, +- (u_int *) &objp->valdat_len, ~0); ++ (u_int *) &objp->valdat_len, YPMAXRECORD); + } + libnsl_hidden_def (xdr_valdat) + diff --git a/glibc.spec b/glibc.spec index 95834a3..3373d12 100644 --- a/glibc.spec +++ b/glibc.spec @@ -28,7 +28,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 17%{?dist} +Release: 18%{?dist} # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. # Things that are linked directly into dynamically linked programs # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional @@ -112,6 +112,7 @@ Patch0034: %{name}-rh841318.patch Patch1035: %{name}-rh845960.patch Patch1037: %{name}-rh849203.patch Patch1038: %{name}-rh805093.patch +Patch1041: %{name}-rh848748.patch # # Patches submitted, but not yet approved upstream. @@ -442,6 +443,7 @@ rm -rf %{glibcportsdir} %patch1038 -p1 %patch2039 -p1 %patch2040 -p1 +%patch1041 -p1 # On powerpc32, hp timing is only available in power4/power6 # libs, not in base, so pre-power4 dynamic linker is incompatible @@ -1248,6 +1250,9 @@ rm -f *.filelist* %endif %changelog +* Mon Oct 1 2012 Jeff Law - 2.16-18 + - Set proper max length when parsing xdr requests (#848748). + * Fri Sep 21 2012 Jeff Law - 2.16-17 - Remove broken patch for 816647.