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: <CAMj1kXGze41X9ogZDEbm7=04XnFRPGjV7RMmeJnOveAsTfgDhQ@mail.gmail.com>
Date:   Tue, 20 Sep 2022 18:44:40 +0200
From:   Ard Biesheuvel <ardb@...nel.org>
To:     "Guilherme G. Piccoli" <gpiccoli@...lia.com>
Cc:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-dev@...lia.com, kernel@...ccoli.net,
        matt@...eblueprint.co.uk, mjg59@...f.ucam.org
Subject: Re: [PATCH V2] efi: efibc: Guard against allocation failure

On Sun, 11 Sept 2022 at 16:36, Guilherme G. Piccoli <gpiccoli@...lia.com> wrote:
>
> On 10/09/2022 01:56, Christophe JAILLET wrote:
> > [...]
> >>      wdata = kmalloc(MAX_DATA_LEN * sizeof(efi_char16_t), GFP_KERNEL);
> > Hi,
> >
> > even if mostly useless in this case, kmalloc_array()?
> >
> > Or certainly maybe even better, kstrndup()?
> >
> > CJ
> >
>
> Thanks! It's up to Ard, I could rework with this change if makes sense.
> Cheers,
>

kstrndup() does not work on wide strings so I think the code is fine as is.

I've queued it as a fix - thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ