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:   Tue, 28 May 2019 17:32:58 +0200
From:   Tomas Bortoli <tomasbortoli@...il.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] trace: Avoid memory leak in predicate_parse()

On 5/28/19 5:29 PM, Steven Rostedt wrote:
> On Tue, 28 May 2019 17:18:59 +0200
> Tomas Bortoli <tomasbortoli@...il.com> wrote:
> 
>>>> +	memset(prog_stack, 0, nr_preds * sizeof(*prog_stack));
>>>> +  
>>>
>>> Can you instead just switch the allocation of prog_stack to use
>>> kcalloc()?  
>>
>> kmalloc_array() is safe against arithmetic overflow of the arguments.
>> Using kcalloc() directly we wouldn't check for that. Not really ideal in
>> my opinion. And there's no kcalloc_array() apparently!
> 
> But doesn't kcalloc() simply call kmalloc_array() with the GFP_ZERO
> flag?
> 

It does! Oops, I'll send it shortly

Tomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ