aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2013-06-07 10:11:19 -0400
committerJ. Bruce Fields <bfields@redhat.com>2013-08-01 08:40:42 -0400
commitdc43376c26cef74226174a2394f37f2a3f8a8639 (patch)
treec784b1265669033cf9f0ab444d5e3d73a1880e44 /net/sunrpc
parent9f96392b0ae6aefc02a9b900c3f4889dfafc8402 (diff)
svcrpc: fix gss-proxy xdr decoding oops
Uninitialized stack data was being used as the destination for memcpy's. Longer term we'll just delete some of this code; all we're doing is skipping over xdr that we don't care about. Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/auth_gss/gss_rpc_xdr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c
index 357f613df7ff..3c85d1c8a028 100644
--- a/net/sunrpc/auth_gss/gss_rpc_xdr.c
+++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c
@@ -430,7 +430,7 @@ static int dummy_enc_nameattr_array(struct xdr_stream *xdr,
430static int dummy_dec_nameattr_array(struct xdr_stream *xdr, 430static int dummy_dec_nameattr_array(struct xdr_stream *xdr,
431 struct gssx_name_attr_array *naa) 431 struct gssx_name_attr_array *naa)
432{ 432{
433 struct gssx_name_attr dummy; 433 struct gssx_name_attr dummy = { .attr = {.len = 0} };
434 u32 count, i; 434 u32 count, i;
435 __be32 *p; 435 __be32 *p;
436 436
@@ -493,12 +493,13 @@ static int gssx_enc_name(struct xdr_stream *xdr,
493 return err; 493 return err;
494} 494}
495 495
496
496static int gssx_dec_name(struct xdr_stream *xdr, 497static int gssx_dec_name(struct xdr_stream *xdr,
497 struct gssx_name *name) 498 struct gssx_name *name)
498{ 499{
499 struct xdr_netobj dummy_netobj; 500 struct xdr_netobj dummy_netobj = { .len = 0 };
500 struct gssx_name_attr_array dummy_name_attr_array; 501 struct gssx_name_attr_array dummy_name_attr_array = { .count = 0 };
501 struct gssx_option_array dummy_option_array; 502 struct gssx_option_array dummy_option_array = { .count = 0 };
502 int err; 503 int err;
503 504
504 /* name->display_name */ 505 /* name->display_name */