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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 17 May 2019 17:06:28 +0800
From:   Gen Zhang <blackgod016574@...il.com>
To:     Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] efi_64: Fix a missing-check bug in
 arch/x86/platform/efi/efi_64.c of Linux 5.1

On Fri, May 17, 2019 at 10:41:28AM +0200, Ard Biesheuvel wrote:
> Returning an error here is not going to make much difference, given
> that the caller of efi_call_phys_prolog() does not bother to check it,
> and passes the result straight into efi_call_phys_epilog(), which
> happily attempts to dereference it.
> 
> So if you want to fix this properly, please fix it at the call site as
> well. I'd prefer to avoid ERR_PTR() and just return NULL for a failed
> allocation though.
Hi Ard,
Thanks for your timely reply!
I think returning NULL in efi_call_phys_prolog() and checking in 
efi_call_phys_epilog() is much better. But I am confused what to return
in efi_call_phys_epilog() if save_pgd is NULL. Definitely not return
-ENOMEM, because efi_call_phys_epilog() returns unsigned long. Could
please light on me to fix this problem?
Thanks
Gen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ