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]
Message-ID: <20150218135619.GA10604@sudip-PC>
Date:	Wed, 18 Feb 2015 19:26:19 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] fs: efs: fix possible memory leak

On Tue, Feb 17, 2015 at 07:31:01PM +0000, Al Viro wrote:
> On Thu, Feb 12, 2015 at 02:32:21PM +0530, Sudip Mukherjee wrote:
> 
> The hell we are not - unlike ->put_super(), ->kill_sb() is *always*
> called, even when fill_super() fails halfway through.  Exactly because
> it makes for simpler cleanup requirements on failure exits in said
> fill_super().  And we have
> static void efs_kill_sb(struct super_block *s)
> {
>         struct efs_sb_info *sbi = SUPER_INFO(s);
>         kill_block_super(s);
>         kfree(sbi);
> }
> for ->kill_sb() there, so sbi will *not* leak.
thanks for explaining this. I was seeing the code in the fat and was trying to figure out why this in efs was not released.
i was have one more doubt about efs_iget() but that also is actually cleared with this.

thanks
sudip

> 
> NAK.  This patch not only complicates efs_fill_super() for no good reason,
> it ends up with double kfree() on those failure exits - ->s_fs_info is
> left pointing to freed memory and efs_kill_sb() does kfree() again.
--
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