From: Kinglong Mee <kinglongmee@gmail.com>
To: Bernd Schubert <bernd.schubert@fastmail.fm>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] nfsd: nfsd4_decode_create: Fix a possible NULL pointer dereference
Date: Sat, 24 May 2014 08:42:27 +0800 [thread overview]
Message-ID: <CAB6yy355GCkjO8u0SVTUEUMJfTUjydNsEB87pwJG2h13T4uWKw@mail.gmail.com> (raw)
In-Reply-To: <53563F16.80809@fastmail.fm>
On Tue, Apr 22, 2014 at 6:06 PM, Bernd Schubert
<bernd.schubert@fastmail.fm> wrote:
>
>> cr_linkname maybe a path contains '/', or '.',
>> check_filename will return error nfserr_badname for those path.
>>
>> IMO, just check whether the length is zero as,
>>
>> if (create->cr_linklen == 0)
>> return nfserr_inval;
>>
> Hmm, right, checking for a '/' not right here. Checking if link-name is
> "." or ".." isn't required, but shouldn't hurt either. But on the other
> hand we can leave that to the underlying file system.
According to rfc3530, 14.2.9, DESCRIPTION
If the newname has a length of 0 (zero), or if newname does not obey
the UTF-8 definition, the error NFS4ERR_INVAL will be returned.
The underlying filesystem will return -ENOENT not -EINVAL.
So, NFSD needs checking it explicitly by-self.
Can you sent the patch of v2?
thanks,
Kinglong Mee
prev parent reply other threads:[~2014-05-24 0:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-18 20:06 [PATCH] nfsd: nfsd4_decode_create: Fix a possible NULL pointer dereference Bernd Schubert
2014-04-21 3:22 ` Kinglong Mee
2014-04-22 10:06 ` Bernd Schubert
2014-05-24 0:42 ` Kinglong Mee [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=CAB6yy355GCkjO8u0SVTUEUMJfTUjydNsEB87pwJG2h13T4uWKw@mail.gmail.com \
--to=kinglongmee@gmail.com \
--cc=bernd.schubert@fastmail.fm \
--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).