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:   Wed, 25 Sep 2019 23:29:42 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     dsterba@...e.cz, Navid Emamdoost <navid.emamdoost@...il.com>,
        David Sterba <dsterba@...e.com>, emamd001@....edu,
        kjlu@....edu, smccaman@....edu, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/affs: release memory if affs_init_bitmap fails

On Tue, Sep 17, 2019 at 11:52:41AM +0200, David Sterba wrote:
> On Mon, Sep 16, 2019 at 11:13:42PM -0500, Navid Emamdoost wrote:
> > In affs_init_bitmap, on error handling path we may release the allocated
> > memory.
> 
> Yes the memory should be released but not all paths that lead to the
> label 'out' are actually errors:

... and none of them should be freeing anything here, errors or no
errors.

> The sbi->s_bitmap would be freed but at umount time it will
> be freed again.

It actually would be freed by superblock destructor, be it on umount
or on failed fill_super.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ