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]
Message-ID: <YHfqOVf1hGlbWjLP@hirez.programming.kicks-ass.net>
Date:   Thu, 15 Apr 2021 09:24:41 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Muhammad Usama Anjum <musamaanjum@...il.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Ingo Molnar <mingo@...nel.org>,
        Miroslav Benes <mbenes@...e.cz>, Borislav Petkov <bp@...e.de>,
        open list <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org, colin.king@...onical.com,
        Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: Re: [PATCH] objtool: prevent memory leak in error paths

On Wed, Apr 14, 2021 at 11:47:09AM +0300, Dan Carpenter wrote:
> On Wed, Apr 14, 2021 at 01:45:11AM +0500, Muhammad Usama Anjum wrote:
> > Memory allocated by sym and sym->name isn't being freed if some error
> > occurs in elf_create_undef_symbol(). Free the sym and sym->name if error
> > is detected before returning NULL.
> > 
> > Addresses-Coverity: ("Prevent memory leak")
> > Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()")
> > Signed-off-by: Muhammad Usama Anjum <musamaanjum@...il.com>
> > ---
> > Only build has been tested.
> > 
> 
> Just ignore leaks from the tools/ directory.  These things run and then
> exit and all the memory is freed.  #OldSchoolGarbageCollector

Mostly true; but I suspect tools/perf might care, it has some longer
running things in.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ