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: <m14or0vul4.fsf@fess.ebiederm.org>
Date:	Fri, 18 Sep 2009 13:58:15 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>, Greg KH <greg@...ah.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [bug] /etc/profile: line 30: /dev/null: Permission denied


As a special case you can implement this much
more simply in devtmpfs_mount just do:

int devtmpfs_mount(const char *mountpoint)
{
        sys_mount("none", "dev", "devtmpfs", MS_SILENT, NULL);
	sys_chmod("dev/console", 0666);
	sys_chmod("dev/tty", 0666);
	sys_chmod("dev/null", 0666);
	sys_chmod("dev/zero", 0666);
}

Not using sys_mount is the problem Christoph was complaining about.

Grafting dev_mount into the global namespace (instead of making
a copy and grafting that is pretty hideous).   It means that
vfs_path_lookup will follow mounts, and it is a reference counting
problem.  You can probably oops the kernel by going into single
user mode and unmounting devtmpfs as the code stands right now.

Eric


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