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:   Mon, 14 Nov 2022 18:50:28 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Wang Yufen <wangyufen@...wei.com>
Cc:     <netdev@...r.kernel.org>, <davem@...emloft.net>,
        <edumazet@...gle.com>, <pabeni@...hat.com>,
        Jiri Pirko <jiri@...lanox.com>
Subject: Re: [PATCH] netdevsim: Fix memory leak of nsim_dev->fa_cookie

On Sat, 12 Nov 2022 14:28:05 +0800 Wang Yufen wrote:
> nsim_dev_trap_fa_cookie_write()
>   kmalloc() fa_cookie
>   nsim_dev->fa_cookie = fa_cookie
> ..
> nsim_drv_remove()
> 
> nsim_dev->fa_cookie alloced, but the nsim_dev_trap_report_work()
> job has not been done, the flow action cookie has not been assigned
> to the metadata. To fix, add kfree(nsim_dev->fa_cookie) to
> nsim_drv_remove().

I don't see the path thru nsim_dev_trap_report_work() which would free
the fa_cookie.

The fix looks right, but the commit message seems incorrect. Isn't the
leak always there, without any race?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ