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:   Thu, 13 Jul 2023 15:44:41 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        <linux-kselftest@...r.kernel.org>, Shuah Khan <shuah@...nel.org>,
        "Shaopeng Tan" <tan.shaopeng@...fujitsu.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        "Colin Ian King" <colin.i.king@...il.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 02/19] selftests/resctrl: Don't leak buffer in
 fill_cache()

Hi Ilpo,

On 7/13/2023 6:19 AM, Ilpo Järvinen wrote:
> The error path in fill_cache() does return before the allocated buffer
> is freed leaking the buffer.
> 
> The leak was introduced when fill_cache_read() started to return errors
> in c7b607fa9325 ("selftests/resctrl: Fix null pointer dereference on

Could you please prefix the sha with "commit" to get a clean
checkpatch.pl check?

> open failed"), before that both fill functions always returned 0.
> 
> Move free() earlier to prevent the mem leak.
> 
> Fixes: c7b607fa9325 ("selftests/resctrl: Fix null pointer dereference on open failed")
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

Thank you for catching this.

With the changelog update:

Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ