From: Steve Dickson <SteveD@RedHat.com>
To: trondmy@kernel.org
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] Fix a buffer overflow in qword_add()
Date: Fri, 8 May 2020 10:10:45 -0400 [thread overview]
Message-ID: <9a49fcea-2576-e345-2450-6411e45e022f@RedHat.com> (raw)
In-Reply-To: <20200416213453.80110-1-trondmy@kernel.org>
On 4/16/20 5:34 PM, trondmy@kernel.org wrote:
> From: Trond Myklebust <trond.myklebust@hammerspace.com>
>
> Don't allow writing beyond the end of the buffer.
>
> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Committed... (tag: nfs-utils-2-4-4-rc4)
steved.
> ---
> support/nfs/cacheio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
> index 126c12831668..70ead94d64f0 100644
> --- a/support/nfs/cacheio.c
> +++ b/support/nfs/cacheio.c
> @@ -42,7 +42,7 @@ void qword_add(char **bpp, int *lp, char *str)
>
> if (len < 0) return;
>
> - while ((c=*str++) && len)
> + while ((c=*str++) && len > 0)
> switch(c) {
> case ' ':
> case '\t':
>
prev parent reply other threads:[~2020-05-08 14:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 21:34 [PATCH] Fix a buffer overflow in qword_add() trondmy
2020-05-08 14:10 ` Steve Dickson [this message]
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=9a49fcea-2576-e345-2450-6411e45e022f@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@kernel.org \
/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