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:	Tue, 12 May 2009 17:54:17 +0200
From:	Kay Sievers <kay.sievers@...y.org>
To:	Stephen Smalley <sds@...ho.nsa.gov>
Cc:	"David P. Quigley" <dpquigl@...ho.nsa.gov>,
	Greg KH <greg@...ah.com>, linux-kernel@...r.kernel.org,
	Greg KH <gregkh@...e.de>, Jan Blunck <jblunck@...e.de>,
	James Morris <jmorris@...ei.org>,
	Eric Paris <eparis@...isplace.org>,
	David Howells <dhowells@...hat.com>
Subject: Re: [patch 00/13] devtmpfs patches

On Tue, May 12, 2009 at 17:35, Stephen Smalley <sds@...ho.nsa.gov> wrote:

> I think the issue is that the devtmpfs functions are calling vfs helpers
> to create and unlink the device nodes, and those helpers apply
> permission checks based on the current process' credentials.  I think a
> similar issue arose in sysfs a while ago.  Options are to either bypass
> the vfs helpers to avoid that permission checking for what I think are
> intended to be kernel-internal operations, or to override credentials
> temporarily around the calls to the vfs helpers, ala:
> new_cred = prepare_kernel_cred(NULL);
> old_cred  = override_creds(new_cred);
> rc = vfs_mknod(...);
> revert_creds(old_cred);

Ah, I see. That's probably what stuff like this is for:

 /**
  * lookup_one_noperm - bad hack for sysfs
  * @name:       pathname component to lookup
  * @base:       base directory to lookup from
  *
  * This is a variant of lookup_one_len that doesn't perform any permission
  * checks.   It's a horrible hack to work around the braindead sysfs
  * architecture and should not be used anywhere else.
  *
  * DON'T USE THIS FUNCTION EVER, thanks.
  */
  struct dentry *lookup_one_noperm(const char *name, struct dentry *base)

Thanks,
Kay
--
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