* [PATCH] gssd: Fix allocated buffer size for the scraped acceptor name in do_downcall
[not found] <454183694.48823.1401178027425.JavaMail.zimbra@opinsys.fi>
@ 2014-05-27 8:50 ` Veli-Matti Lintu
2014-05-27 10:23 ` Jeff Layton
2014-06-01 17:14 ` Steve Dickson
0 siblings, 2 replies; 3+ messages in thread
From: Veli-Matti Lintu @ 2014-05-27 8:50 UTC (permalink / raw)
To: steved; +Cc: linux-nfs, Tuomas Räsänen, Jeff Layton
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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gssd: Fix allocated buffer size for the scraped acceptor name in do_downcall
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
2014-06-01 17:14 ` Steve Dickson
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2014-05-27 10:23 UTC (permalink / raw)
To: Veli-Matti Lintu; +Cc: steved, linux-nfs, Tuomas Räsänen
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gssd: Fix allocated buffer size for the scraped acceptor name in do_downcall
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
@ 2014-06-01 17:14 ` Steve Dickson
1 sibling, 0 replies; 3+ messages in thread
From: Steve Dickson @ 2014-06-01 17:14 UTC (permalink / raw)
To: Veli-Matti Lintu; +Cc: linux-nfs, Tuomas Räsänen, Jeff Layton
On 05/27/2014 04:50 AM, Veli-Matti Lintu 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>
Committed..
steved.
> ---
> 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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-01 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
2014-06-01 17:14 ` Steve Dickson
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).