linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@poochiereds.net>
To: Veli-Matti Lintu <veli-matti.lintu@opinsys.fi>
Cc: steved@redhat.com, linux-nfs@vger.kernel.org,
	"Tuomas Räsänen" <tuomas.rasanen@opinsys.fi>
Subject: Re: [PATCH] gssd: Fix allocated buffer size for the scraped acceptor name  in do_downcall
Date: Tue, 27 May 2014 06:23:31 -0400	[thread overview]
Message-ID: <20140527062331.0ccd43ad@poochiereds.net> (raw)
In-Reply-To: <41011674.48947.1401180626967.JavaMail.zimbra@opinsys.fi>

On Tue, 27 May 2014 08:50:26 +0000 (UTC)
Veli-Matti Lintu <veli-matti.lintu@opinsys.fi> wrote:

> 
> In commit 51fda07a "gssd: scrape the acceptor name out of the context"
> the allocated buffer size is not large enough to hold the actual data
> that is written to the buffer. This fixes the allocated buffer size.
> 
> Signed-off-by: Veli-Matti Lintu <veli-matti.lintu@opinsys.fi>
> ---
>  utils/gssd/gssd_proc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
> index 69bb3c6..40ff188 100644
> --- a/utils/gssd/gssd_proc.c
> +++ b/utils/gssd/gssd_proc.c
> @@ -696,7 +696,7 @@ do_downcall(int k5_fd, uid_t uid, struct authgss_private_data *pd,
>  	buf_size = sizeof(uid) + sizeof(timeout) + sizeof(pd->pd_seq_win) +
>  		sizeof(pd->pd_ctx_hndl.length) + pd->pd_ctx_hndl.length +
>  		sizeof(context_token->length) + context_token->length +
> -		acceptor->length;
> +		sizeof(acceptor->length) + acceptor->length;
>  	p = buf = malloc(buf_size);
>  	if (!buf)
>  		goto out_err;

Nice catch...

Reviewed-by: Jeff Layton <jlayton@poochiereds.net>

  reply	other threads:[~2014-05-27 10:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <454183694.48823.1401178027425.JavaMail.zimbra@opinsys.fi>
2014-05-27  8:50 ` [PATCH] gssd: Fix allocated buffer size for the scraped acceptor name in do_downcall Veli-Matti Lintu
2014-05-27 10:23   ` Jeff Layton [this message]
2014-06-01 17:14   ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140527062331.0ccd43ad@poochiereds.net \
    --to=jlayton@poochiereds.net \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    --cc=tuomas.rasanen@opinsys.fi \
    --cc=veli-matti.lintu@opinsys.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).