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] [day] [month] [year] [list]
Date:	Thu, 8 Jul 2010 02:17:20 +1000
From:	Nick Piggin <npiggin@...e.de>
To:	Christoph Hellwig <hch@....de>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	Al Viro <viro@...IV.linux.org.uk>,
	Frank Mayhar <fmayhar@...gle.com>,
	John Stultz <johnstul@...ibm.com>,
	Andi Kleen <ak@...ux.intel.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [patch 2/2] tty fix fu_list abuse

On Wed, Jul 07, 2010 at 06:08:35PM +0200, Christoph Hellwig wrote:
> On Wed, Jul 07, 2010 at 10:25:10PM +1000, Nick Piggin wrote:
> > tty: fix fu_list abuse
> > 
> > tty code abuses fu_list, which causes a bug in remount,ro handling.
> > 
> > If a tty device node is opened on a filesystem, then the name unlinked, the
> > filesystem will be allowed to be remounted readonly. This is because
> > fs_may_remount_ro does not find the 0 link tty inode on the file sb list
> > (because the tty code incorrectly removed it to use for its own purpose). This
> > can result in a filesystem with errors after it is marked "clean".  So add a
> > new private list for ttys and leave tty files on the sb list so they are caught
> > by this check. This makes tty nodes behave the same way as other device nodes.
> > 
> > The next step is to allocate a tty private structure at private_data and get
> > rid of f_ttyonly_list, but the error handling is not trivial in the tty code.
> > Hence this intermediate step.
> 
> Growing struct file by two pointers for the tty special case simply
> isn't acceptable.  

I agree, so it can be removed when tty gets its act together. But tty
breaks the s_files list right now which is not acceptable either. So I
think it is better to take the simple fix that can be easily applied. I
liked your patch, but error handling was totally broken in it so that
indicates it is going to require some maturing in the tty tree.

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