linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fred Isaman <iisaman@netapp.com>
To: Jesper Juhl <jj@chaosbits.net>
Cc: linux-nfs@vger.kernel.org,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NFS4: Avoid potential NULL pointer dereference in decode_and_add_ds().
Date: Mon, 17 Jan 2011 14:09:31 -0500	[thread overview]
Message-ID: <AANLkTimFfyT4M=0=mxfF4ZZjip2wbO27p_zUJg26TO2q@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1101171941560.27021-h2p7t3/P30RzeRGmFJ5qR7ZzlVVXadcDXqFh9Ls21Oc@public.gmane.org>

On Mon, Jan 17, 2011 at 1:42 PM, Jesper Juhl <jj@chaosbits.net> wrote:
> On Mon, 17 Jan 2011, Fred Isaman wrote:
>
>> On Sun, Jan 16, 2011 at 3:50 PM, Jesper Juhl <jj@chaosbits.net> wrot=
e:
>> > strrchr() can return NULL if nothing is found. If this happens we'=
ll
>> > dereference a NULL pointer in
>> > fs/nfs/nfs4filelayoutdev.c::decode_and_add_ds().
>> >
>> > I tried to find some other code that guarantees that this can neve=
r
>> > happen but I was unsuccessful. So, unless someone else can point t=
o some
>> > code that ensures this can never be a problem, I believe this patc=
h is
>> > needed.
>> >
>>
>> The only guarantee is the assumption that the server isn't sending
>> garbage. =A0As such, this patch looks good to me.
>>
>
> Thanks. Can I add your Acked-by: if/when I resend the patch?
>

Yes.

=46red

> --
> Jesper Juhl <jj@chaosbits.net> =A0 =A0 =A0 =A0 =A0 =A0http://www.chao=
sbits.net/
> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
> Plain text mails only, please.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>

      parent reply	other threads:[~2011-01-17 19:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-16 20:50 [PATCH] NFS4: Avoid potential NULL pointer dereference in decode_and_add_ds() Jesper Juhl
2011-01-17  3:10 ` Mi Jinlong
2011-01-17 18:41   ` Jesper Juhl
     [not found]     ` <alpine.LNX.2.00.1101171940480.27021-h2p7t3/P30RzeRGmFJ5qR7ZzlVVXadcDXqFh9Ls21Oc@public.gmane.org>
2011-01-18 14:43       ` Andy Adamson
2011-01-17 17:04 ` Fred Isaman
     [not found]   ` <AANLkTik+Z5C89Hb9Xu3az=deMsXj4rqvYpU=i7vXgdFx-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-17 18:42     ` Jesper Juhl
     [not found]       ` <alpine.LNX.2.00.1101171941560.27021-h2p7t3/P30RzeRGmFJ5qR7ZzlVVXadcDXqFh9Ls21Oc@public.gmane.org>
2011-01-17 19:09         ` Fred Isaman [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='AANLkTimFfyT4M=0=mxfF4ZZjip2wbO27p_zUJg26TO2q@mail.gmail.com' \
    --to=iisaman@netapp.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=jj@chaosbits.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.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;
as well as URLs for NNTP newsgroup(s).