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: <20181020174109.GE28301@zn.tnic>
Date:   Sat, 20 Oct 2018 19:41:36 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v2] x86/microcode: Handle negative microcode revisions

Dropping stable.

On Sat, Oct 20, 2018 at 07:41:58AM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@...ux.intel.com>
> 
> The Intel microcode revision space is unsigned. Inside Intel there are special
> microcodes that have the highest bit set, and they are considered to have
> a higher revision than any microcodes that don't have this bit set.
> 
> The function comparing the microcode revision in the Linux driver compares
> u32 with int, which ends up being signed extended to long on 64bit
> systems. This results in these highest bit set microcode revision not loading
> because their revision appears negative and smaller than the
> existing microcode.
> 
> Change the comparison to unsigned. With that the loading works
> as expected.
> 
> Cc: stable@...r.kernel.org # Any supported stable
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> --
> v2: White space changes.
> ---
>  arch/x86/kernel/cpu/microcode/intel.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
> index 16936a24795c..e54d402500d3 100644
> --- a/arch/x86/kernel/cpu/microcode/intel.c
> +++ b/arch/x86/kernel/cpu/microcode/intel.c
> @@ -93,7 +93,8 @@ static int find_matching_signature(void *mc, unsigned int csig, int cpf)
>  /*
>   * Returns 1 if update has been found, 0 otherwise.
>   */
> -static int has_newer_microcode(void *mc, unsigned int csig, int cpf, int new_rev)
> +static int has_newer_microcode(void *mc, unsigned int csig, int cpf,
> +			       unsigned new_rev)
>  {
>  	struct microcode_header_intel *mc_hdr = mc;
>  
> -- 

Please incorporate all review comments before sending a new version of
your patch.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ