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:	Fri, 23 May 2008 11:52:35 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	hch@...radead.org
CC:	miklos@...redi.hu, linux-fsdevel@...r.kernel.org,
	hch@...radead.org, viro@...IV.linux.org.uk,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 11/14] vfs: move executable checking into ->permission()

> > From: Miklos Szeredi <mszeredi@...e.cz>
> > 
> > For execute permission on a regular files we need to check if file has
> > any execute bits at all, regardless of capabilites.
> > 
> > This check is normally performed by generic_permission() but was also
> > added to the case when the filesystem defines its own ->permission()
> > method.  In the latter case the filesystem should be responsible for
> > performing this check.
> > 
> > So create a helper function exec_permission() that checks returns
> > -EACCESS if MAY_EXEC is present, the inode is a regular file and no
> > execute bits are present in inode->i_mode.
> > 
> > Call this function from filesystems which don't call
> > generic_permission() from their ->permission() methods and which
> > aren't already performing this check.  Also remove the check from
> > dentry_permission().
> > 
> > The new code should be equivalent to the old.
> 
> There's no point moving this into the filesystem.

Yes, there is.  Fuse already has special code, because it need to
refresh the attributes first before doing the "are there any x bits in
mode?" check.  And because there's some duplication, I've introduced a
helper.  That's exactly how we handle this sort of thing.

Miklos
--
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