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]
Message-ID: <20260123124219.689f35f1@gandalf.local.home>
Date: Fri, 23 Jan 2026 12:42:19 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Weigang He <geoffreyhe2@...il.com>, Mathieu Desnoyers
 <mathieu.desnoyers@...icios.com>, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v2] scripts/tracepoint-update: fix memory leak in
 add_string() on failure

On Wed, 21 Jan 2026 11:22:53 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:

> > 
> > Fix this by freeing *vals and setting it to NULL when realloc() fails.
> > This makes the error handling self-contained in add_string() so callers
> > don't need to handle cleanup on failure.  
> 
> This looks not enough. If the memory allocation is failed, it should NOT
> continue anything.
> 
> I think we need to make the command itself failure when it fails to
> allocate memory, as below:

That's a separate bug. I'm taking this current patch as-is as a fix for the
leak. Not stopping immediately is a separate issue.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ