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: <Yn2D7UjbBAiwxChT@zn.tnic>
Date:   Fri, 13 May 2022 00:02:21 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Ashish Kalra <Ashish.Kalra@....com>
Cc:     pbonzini@...hat.com, seanjc@...gle.com, tglx@...utronix.de,
        mingo@...hat.com, hpa@...or.com, joro@...tes.org,
        Thomas.Lendacky@....com, x86@...nel.org, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, theflow@...gle.com,
        rientjes@...gle.com, pgonda@...gle.com, john.allen@....com
Subject: Re: [PATCH] KVM: SVM: Use kzalloc for sev ioctl interfaces to
 prevent kernel memory leak.

On Thu, May 12, 2022 at 08:23:28PM +0000, Ashish Kalra wrote:
> From: Ashish Kalra <ashish.kalra@....com>
> 
> For some sev ioctl interfaces, the length parameter that is passed maybe
> less than or equal to SEV_FW_BLOB_MAX_SIZE, but larger than the data
> that PSP firmware returns. In this case, kmalloc will allocate memory
> that is the size of the input rather than the size of the data.
> Since PSP firmware doesn't fully overwrite the allocated buffer, these
> sev ioctl interface may return uninitialized kernel slab memory.
> 
> Reported-by: Andy Nguyen <theflow@...gle.com>
> Suggested-by: David Rientjes <rientjes@...gle.com>
> Suggested-by: Peter Gonda <pgonda@...gle.com>
> Cc: kvm@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Ashish Kalra <ashish.kalra@....com>

This looks like it needs one (or more) Fixes: tags pointing to the
patch(es) adding those kmalloc calls...

And then Cc: <stable@...r.kernel.org> too.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ