All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vince Busam <vbusam@google.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: nfs@lists.sourceforge.net
Subject: Re: segfault in mount with CITI patch
Date: Thu, 22 Dec 2005 15:43:29 -0800	[thread overview]
Message-ID: <43AB3A21.6010503@google.com> (raw)
In-Reply-To: <1135292911.3685.4.camel@lade.trondhjem.org>

Trond Myklebust wrote:
> On Wed, 2005-12-21 at 17:30 -0800, Vince Busam wrote:
> 
>>Is nfsvers=3,mountvers=2 even OK to do?  If not, mount should print an error instead of 
>>segfault.
> 
> 
> Do you mean that the kernel Oopses, or is it really just a userland
> segfault. If the latter, we really don't care too much: mixing nfsvers=3
> and mountvers=2 is just silly. Sure, we can put a check in util-linux,
> but there is no security implication.


It's a harmless userland segfault that could be fixed with a simple check like this (or a 
more thorough one if somebody has more knowledge over which versions don't work together).

Vince

--- util-linux-2.12.nfsv4/mount/nfsmount.c.orig 2005-12-21 15:56:02.000000000 -0800
+++ util-linux-2.12.nfsv4/mount/nfsmount.c      2005-12-22 13:51:33.000000000 -0800
@@ -803,6 +803,10 @@ nfsmnt_check_compat(const struct pmap *n
                         mnt_pmap->pm_vers);
                 goto out_bad;
         }
+       if ((nfs_pmap->pm_vers == 3) && (mnt_pmap->pm_vers < 3)) {
+               fprintf(stderr, _("NFS version 3 not supported with mount < 3\n"));
+               goto out_bad;
+       }
         return 1;
   out_bad:
         return 0;


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

      reply	other threads:[~2005-12-22 23:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-22  1:30 segfault in mount with CITI patch Vince Busam
2005-12-22 23:08 ` Trond Myklebust
2005-12-22 23:43   ` Vince Busam [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=43AB3A21.6010503@google.com \
    --to=vbusam@google.com \
    --cc=nfs@lists.sourceforge.net \
    --cc=trond.myklebust@fys.uio.no \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.