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]
Date:   Sat, 11 Nov 2023 22:49:56 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     Michael Roth <michael.roth@....com>, x86@...nel.org
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H . Peter Anvin" <hpa@...or.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        Joerg Roedel <jroedel@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/sev: Fix overflow when computing address for
 PVALIDATE

On 11/10/23 18:00, Michael Roth wrote:
> -		vaddr = (unsigned long)pfn_to_kaddr(e->gfn);
> +		vaddr = (unsigned long)pfn_to_kaddr((unsigned long)e->gfn);
>  		size = e->pagesize ? RMP_PG_SIZE_2M : RMP_PG_SIZE_4K;
>  		validate = e->operation == SNP_PAGE_STATE_PRIVATE;
>  

... and people wonder why some of us avoid bitfields.

Shouldn't we just fix this permanently in pfn_to_kaddr()?  Surely more
of these are lurking around.  Anything doing a large shift up on a
little type is asking for trouble.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ