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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160510202458.GD10623@veci.piliscsaba.szeredi.hu>
Date:	Tue, 10 May 2016 22:24:58 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-unionfs@...r.kernel.org
Subject: Re: [GIT PULL] overlayfs fixes for 4.6-rc7

On Tue, May 10, 2016 at 04:27:05PM +0100, Al Viro wrote:
> 	NAK on lookup_hash().  If nothing else, you need either
> lookup_one_len_unlocked() or its "we already know hash" variant (assuming it's
> worth bothering with).  That locking the parent is potentially a lot costlier
> than recalculating the (default) hash function.  Especially in -next, where
> lookup_one_len_unlocked() will take the lock shared if it has to take it at
> all, but the mainline one also has a good chance to avoid taking the lock.

Can't use lookup_one_len_unlocked() because point of the fix is to lose the
permission check.

So how about this?

| struct dentry *lookup_hash(const struct qstr *name, struct dentry *base)
| {
| 	struct dentry *ret;
| 
| 	ret = lookup_dcache(name, base, 0);
| 	if (!ret)
| 		ret = lookup_slow(name, base, 0);
| 
| 	return ret;
| }

Updated pull request:

  git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-linus

---
Miklos Szeredi (3):
      vfs: rename: check backing inode being equal
      vfs: export lookup_hash() to modules
      ovl: ignore permissions on underlying lookup

---
 fs/namei.c            | 40 +++++++++++++++++++++++++++++++++++++++-
 fs/overlayfs/super.c  |  4 +---
 include/linux/namei.h |  2 ++
 3 files changed, 42 insertions(+), 4 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ