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:	Sat, 15 Mar 2008 17:59:52 -0400
From:	Alan Cox <alan@...hat.com>
To:	Eric Paris <eparis@...hat.com>
Cc:	linux-kernel@...r.kernel.org, alan <alan@...hat.com>,
	aviro@...hat.com, drepper@...hat.com, hch@...radead.org,
	sds@...ho.nsa.gov, jmorris@...ei.org
Subject: Re: [RFC] correct flags to f_mode conversion in __dentry_open

On Wed, Mar 12, 2008 at 02:25:27PM -0400, Eric Paris wrote:
> I recently tried to add an SELinux BUG_ON in the case where the kernel
> made a permission request for no permissions and was able to stumble
> over it with something as simple as
> 
> open("/dev/null", 3);
> 
> Notice that 3 == (O_RDWR | O_WRONLY)
> 
> First question, is 3 ever a valid flag from from userspace to sys_open?

Yes.

> does 11 really mean and should it really always be mapped to (FMODE_READ
> | FMODE_WRITE) or should it continue to get mapped to 'no permission?'

We've always mapped 3 to "no permission" to read or write. It's a linuxism


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