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]
Message-ID: <CAPXgP13_gczQmG_USAp0p2AuTfxkzAvzHvjbZY_rbbLH-4rDyg@mail.gmail.com>
Date:	Tue, 24 Jan 2012 23:54:38 +0100
From:	Kay Sievers <kay.sievers@...y.org>
To:	"Serge E. Hallyn" <serge@...lyn.com>
Cc:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	containers@...ts.linux-foundation.org,
	Dave Hansen <haveblue@...ibm.com>,
	linux-kernel@...r.kernel.org, Andy Whitcroft <apw@...onical.com>,
	sukadev@...ux.vnet.ibm.com,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [RFC] fix devpts mount behavior

On Tue, Jan 24, 2012 at 23:02, Serge E. Hallyn <serge@...lyn.com> wrote:
> Quoting Eric W. Biederman (ebiederm@...ssion.com):

>> It looks like relatively recent udev still creates /dev/ptmx and does
>
> Boy, it does, and it's stubborn about it.  Removing the /lib/udev/rules.d
> entry doesn't stop it.  (this is after I've had an init job replace the
> devtmpfs-created ptmx entry with a symlink)

Udev has nothing to do with that. The kernel creates that device node.
Udev does not carry any rules you could remove, to name device nodes,
it only set permissions and creates symlinks to device nodes.

It will never replace a kernel-created device node with a symlink,
there is no way to express that. If you don't want a device node
there, you need to change the kernel, to not export
/sys/class/tty/ptmx/ the way it is today.

> So current distros (well, Ubuntu and Fedora at least) would need to at least
> (a) fix udev,

To do what?

> (b) change the default devpts mount (done from initramfs) to
> add ptmxmode=666,

> (c) (if not done in udev) create the /dev/ptmx symlink.

Udev can only create symlinks to devices the driver-core creates, not
to devices inside a custom filesystem.

> For safety I'd recommend creating /dev/pts/ptmx with
> DEVPTS_MULTIPLE_INSTANCES=n (or dropping that support), and by default
> setting ptmxmode to 666 as that's what udev does.

The mode for ptmx is set by the kernel itself, and does not even need
udev to do that:
  $ cat /sys/class/tty/ptmx/uevent
  MAJOR=5
  MINOR=2
  DEVNAME=ptmx
  DEVMODE=0666

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