lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 23 Oct 2011 10:35:14 +0300
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Greg KH <gregkh@...e.de>
Cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	stable-review@...r.kernel.org, akpm@...ux-foundation.org,
	alan@...rguk.ukuu.org.uk, David Howells <dhowells@...hat.com>,
	Ian Kent <raven@...maw.net>, Al Viro <viro@...iv.linux.org.uk>,
	Chuck Ebbert <cebbert@...hat.com>,
	Miklos Szeredi <miklos@...redi.hu>,
	Trond Myklebust <Trond.Myklebust@...app.com>
Subject: Re: [22/27] VFS: Fix automount for negative autofs dentries

This one is debatable.

I think it also wants

 - commit 0ec26fd0698285b31248e34bf1abb022c00f23d6 (with
LOOKUP_PARENT->LOOKUP_CONTINUE too)

 - commit d94c177beeb4469cd4f6e83354ab0223353e98ed (to get the few
other cases right too)

anything else I missed?

             Linus

On Sun, Oct 23, 2011 at 9:24 AM, Greg KH <gregkh@...e.de> wrote:
> 3.0-stable review patch.  If anyone has any objections, please let us know.
>
> ------------------
>
> From: David Howells <dhowells@...hat.com>
>
> commit 5a30d8a2b8ddd5102c440c7e5a7c8e1fd729c818 upstream.
> [ backport for 3.0.x: LOOKUP_PARENT => LOOKUP_CONTINUE by Chuck Ebbert
> <cebbert@...hat.com> ]
>
> Autofs may set the DCACHE_NEED_AUTOMOUNT flag on negative dentries.  These
> need attention from the automounter daemon regardless of the LOOKUP_FOLLOW flag.
>
> Signed-off-by: David Howells <dhowells@...hat.com>
> Acked-by: Ian Kent <raven@...maw.net>
> Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
> Cc: Chuck Ebbert <cebbert@...hat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
>
> ---
>  fs/namei.c |   24 +++++++++++++++---------
>  1 file changed, 15 insertions(+), 9 deletions(-)
>
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -779,19 +779,25 @@ static int follow_automount(struct path
>        if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_CONTINUE))
>                return -EISDIR; /* we actually want to stop here */
>
> -       /* We want to mount if someone is trying to open/create a file of any
> -        * type under the mountpoint, wants to traverse through the mountpoint
> -        * or wants to open the mounted directory.
> -        *
> +       /*
>         * We don't want to mount if someone's just doing a stat and they've
>         * set AT_SYMLINK_NOFOLLOW - unless they're stat'ing a directory and
>         * appended a '/' to the name.
>         */
> -       if (!(flags & LOOKUP_FOLLOW) &&
> -           !(flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY |
> -                      LOOKUP_OPEN | LOOKUP_CREATE)))
> -               return -EISDIR;
> -
> +       if (!(flags & LOOKUP_FOLLOW)) {
> +               /* We do, however, want to mount if someone wants to open or
> +                * create a file of any type under the mountpoint, wants to
> +                * traverse through the mountpoint or wants to open the mounted
> +                * directory.
> +                * Also, autofs may mark negative dentries as being automount
> +                * points.  These will need the attentions of the daemon to
> +                * instantiate them before they can be used.
> +                */
> +               if (!(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
> +                            LOOKUP_OPEN | LOOKUP_CREATE)) &&
> +                   path->dentry->d_inode)
> +                       return -EISDIR;
> +       }
>        current->total_link_count++;
>        if (current->total_link_count >= 40)
>                return -ELOOP;
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ