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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090317125346.GA22268@adriano.hkcable.com.hk>
Date:	Tue, 17 Mar 2009 20:53:47 +0800
From:	Zhang Le <r0bertz@...too.org>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	Al Viro <viro@...IV.linux.org.uk>, linux-kernel@...r.kernel.org,
	torvalds@...l.org, alan@...hat.com
Subject: Re: [PATCH] filp->f_pos not correctly updated in proc_task_readdir

On 13:37 Tue 17 Mar     , Alexey Dobriyan wrote:
> On Mon, Mar 16, 2009 at 08:34:57AM +0000, Al Viro wrote:
> > On Mon, Mar 16, 2009 at 02:44:31PM +0800, Zhang Le wrote:
> > > filp->f_pos only get updated at the end of the function. Thus d_off of those
> > > dirents who are in the middle will be 0, and this will cause a problem in
> > > glibc's readdir implementation, specifically endless loop. Because when overflow
> > > occurs, f_pos will be set to next dirent to read, however it will be 0, unless
> > > the next one is the last one. So it will start over again and again.
> > 
> > Eh...  Here's what's really going on:
> > 
> > proc_..._fill_cache() API is rather kludgy and far too convoluted.  In
> > particular, it calls filldir() and passes file->f_pos to it, expecting
> > the caller to update file->f_pos between the calls.  proc_task_readdir()
> > uses that sucker, but doesn't update ->f_pos until the very end.  As
> > the result, d_off of direntries produced by it gets screwed.
> > Broken-by: commit 61a28784028e6d55755e4d0f39bee8d9bf2ee8d9
> > Author: Eric W. Biederman <ebiederm@...ssion.com>
> > Date:   Mon Oct 2 02:18:49 2006 -0700
> > 
> >     [PATCH] proc: Remove the hard coded inode numbers
> > 
> > Patch is fine, but I'd rather rip the layers of ..._fill_cache() abstractions
> > out and see what falls out.  Anyway, for -rc your variant is definitely the
> > way to go.
> 
> Except this bit:
> 
> fs/built-in.o: In function `proc_task_readdir':
> compr_zlib.c:(.text+0x434b8): undefined reference to `__cmpdi2'
> compr_zlib.c:(.text+0x434d4): undefined reference to `__cmpdi2'

Hi, I am sorry but I can't reproduce this.
Are you sure this only happens after applying my patch?
Would you please provide your fs/jffs2/compr_zlib.o and fs/proc/base.o?
And what is your gcc version? I am using gcc 4.4 snapshot rev. 144705
Thanks!

Zhang, Le
http://zhangle.is-a-geek.org
--
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