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, 25 Aug 2012 20:12:18 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Cyrill Gorcunov <gorcunov@...nvz.org>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	Alexey Dobriyan <adobriyan@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Pavel Emelyanov <xemul@...allels.com>,
	James Bottomley <jbottomley@...allels.com>,
	Matthew Helsley <matt.helsley@...il.com>,
	aneesh.kumar@...ux.vnet.ibm.com, bfields@...ldses.org
Subject: Re: [patch 1/9] procfs: Move /proc/pid/fd[info] handling code to
 fd.[ch]

On Sat, Aug 25, 2012 at 10:58:29PM +0400, Cyrill Gorcunov wrote:
> On Sat, Aug 25, 2012 at 06:55:04PM +0100, Al Viro wrote:
> > > Well, this could be simplified indeed, if I understand you correctly
> > > you propose just save f_mode in flexible array and use it instead
> > > of struct file, right? (which will require to rewrite code a bit)
> > 
> > Yes.  FWIW, proc_fill_cache() is really atrocious ;-/  Not to mention
> 
> OK, thanks. I'm putting this cleanup task in my big todo list. Hope I'll
> manage on the next week with it.
> 
> > anything else, if we ever get a negative dentry there, we have a dentry
> > leak.  I don't think it's possible in practice, but...  Furthermore,
> 
> could you please elaborate, you mean this string?

I mean that if we get to that if (... || !child->d_inode) and end up
evaluating the last part at all, we have acquired a reference to that
struct dentry.  And if that last part ends up being true (i.e. if it's
a negative dentry), we'll return from function without having dropped
the reference we'd acquired.
--
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