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:   Sun, 27 Sep 2020 14:25:16 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     Vadym Kochan <vadym.kochan@...ision.eu>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] nvmem: core: fix possibly memleak when use
 nvmem_cell_info_to_nvmem_cell()

On Fri, Sep 25, 2020 at 10:32:42AM +0100, Srinivas Kandagatla wrote:
> 
> 
> On 23/09/2020 21:44, Vadym Kochan wrote:
> > Fix missing 'kfree_const(cell->name)' when call to
> > nvmem_cell_info_to_nvmem_cell() in several places:
> > 
> >       * after nvmem_cell_info_to_nvmem_cell() failed during
> >         nvmem_add_cells()
> > 
> >       * during nvmem_device_cell_{read,write} when cell->name is
> >         kstrdup'ed() without calling kfree_const() at the end, but
> >         really there is no reason to do that 'dup, because the cell
> >         instance is allocated on the stack for some short period to be
> >         read/write without exposing it to the caller.
> > 
> > So the new nvmem_cell_info_to_nvmem_cell_nodup() helper is introduced
> > which is used to convert cell_info -> cell without name duplication as
> > a lighweight version of nvmem_cell_info_to_nvmem_cell().
> > 
> > Fixes: e2a5402ec7c6 ("nvmem: Add nvmem_device based consumer apis.")
> > Signed-off-by: Vadym Kochan <vadym.kochan@...ision.eu>
> 
> Looks good to me! Thanks for the patch.
> 
> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> 
> Greg,
> 
> Can you please pick this one? As don't have any nvmem pending patches to
> send it together.

Will do, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ