Re: [PATCH] KVM: SVM: Use kzalloc for sev ioctl interfaces to prevent kernel memory leak.

From: Sean Christopherson
Date: Fri May 13 2022 - 15:56:23 EST


On Fri, May 13, 2022, Ashish Kalra wrote:
> Hello Sean & Peter,
> > Looking through other copy_to_user() calls:
> >
> > - "blob" in sev_ioctl_do_pek_csr()
> > - "id_blob" in sev_ioctl_do_get_id2()
> > - "pdh_blob" and "cert_blob" in sev_ioctl_do_pdh_export()
>
> These functions are part of the ccp driver and a fix for them has already
> been sent upstream to linux-crypto@xxxxxxxxxxxxxxx and
> linux-kernel@xxxxxxxxxxxxxxx:
>
> [PATCH] crypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel
> memory leak

Ha, that's why I was getting a bit of deja vu. I saw that fly by and then got it
confused with this patch.