Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Ming Zhang <blackmagic02881@gmail.com>
Cc: nfs@lists.sourceforge.net
Subject: Re: question about fh_copy
Date: Sun, 28 Jan 2007 20:04:19 -0500	[thread overview]
Message-ID: <20070129010419.GF12125@fieldses.org> (raw)
In-Reply-To: <1170030999.9144.8.camel@localhost.localdomain>

On Sun, Jan 28, 2007 at 07:36:39PM -0500, Ming Zhang wrote:
> On Sun, 2007-01-28 at 18:01 -0500, J. Bruce Fields wrote:
> > On Sat, Jan 27, 2007 at 10:20:08AM -0500, Ming Zhang wrote:
> > > A question about fh_copy(). This function is called many times on
> > > argument passed directly from nfs clients. If a malicious nfs client
> > > forge a fh, then fh_copy can invoke oops quite easily.
> > 
> > I don't see how; can you explain?
> 
> svc_process at http://lxr.linux.no/source/net/sunrpc/svc.c?v=2.6.18#L386
> invoke a rpc processing function, for example, nfsd3_proc_getattr
> then at http://lxr.linux.no/source/fs/nfsd/nfs3proc.c?v=2.6.18#L64
> invoke fh_copy before fh_verify. since src coming from client, client
> can forge a fh to let code
> http://lxr.linux.no/source/include/linux/nfsd/nfsfh.h?v=2.6.18#L222 get
> executed. if fh_dentry is a invalid pointer, it can get oops.

The fh_dentry field does not contain client-provided data; look at
nfs3xdr.c:decode_fh() to see how the svc_fh structure is initialized.

--b.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2007-01-29  1:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-27 15:20 question about fh_copy Ming Zhang
2007-01-28 23:01 ` J. Bruce Fields
2007-01-29  0:36   ` Ming Zhang
2007-01-29  1:04     ` J. Bruce Fields [this message]
2007-01-29 14:10       ` Ming Zhang
2007-01-29 20:35         ` rpc.gssd segfault on FC5 client Jim Davis
2007-01-29 22:02           ` Kevin Coffman
2007-01-29 22:06             ` Jim Davis
2007-01-29 22:44               ` Kevin Coffman
2007-01-29 22:49                 ` Jim Davis
2007-01-29 23:18                   ` Kevin Coffman
2007-01-29 23:34                     ` Jim Davis
2007-01-30  0:02                       ` Kevin Coffman

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=20070129010419.GF12125@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=blackmagic02881@gmail.com \
    --cc=nfs@lists.sourceforge.net \
    /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