linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
To: William Dauchy <wdauchy@gmail.com>
Cc: Linux NFS mailing list <linux-nfs@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: nfsv4 mount with noexec
Date: Sun, 2 Jun 2013 20:56:04 +0000	[thread overview]
Message-ID: <1370206557.46256.12.camel@leira.trondhjem.org> (raw)
In-Reply-To: <CAJ75kXa858MgWZ5A5dt+EswJyR4rJx1ke5Siv8hxds5FPJz_ww@mail.gmail.com>

On Sat, 2013-06-01 at 13:33 +0200, William Dauchy wrote:
> Hello,
> 
> I've been testing a nfsv4 client based on a 3.8.13 kernel with the
> following additional patches:
> a3c3cac SUNRPC: Prevent an rpc_task wakeup race
> f448bad NFSv4: Fix a thinko in nfs4_try_open_cached
> eb54d43 NFS: Fix security flavor negotiation with legacy binary mounts
> 
> the mount options are:
> type nfs4
> rw,nosuid,nodev,noexec,noatime,nodiratime,vers=4.0,rsize=32768,wsize=32768,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,local_lock=none
> 
> Even with the noexec option, I'm still able to execute local binaries
> on the mounted file system.
> Am I wrong on something? I didn't had the issue on a 3.4.x

The mount level flags such as 'nosuid', 'nodev' and 'noexec' are
supposed to be enforced by the VFS, and not by the NFS code. The check
is supposedly done in fs/exec.c:open_exec() after the file has been
opened by the filesystem.

Does 'cat /proc/mounts' actually show the noexec option being applied to
the mountpoint by the kernel?

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

  reply	other threads:[~2013-06-02 20:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01 11:33 nfsv4 mount with noexec William Dauchy
2013-06-02 20:56 ` Myklebust, Trond [this message]
2013-06-02 23:05   ` William Dauchy

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=1370206557.46256.12.camel@leira.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=wdauchy@gmail.com \
    /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).