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>] [day] [month] [year] [list]
Message-ID: <a5d0e94ba8cc4926a1ef27e6efcee594@huawei.com>
Date:   Wed, 27 Nov 2019 08:47:05 +0000
From:   linmiaohe <linmiaohe@...wei.com>
To:     Haiwei Li <lihaiwei.kernel@...il.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>
CC:     "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "rkrcmar@...hat.com" <rkrcmar@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>,
        "wanpengli@...cent.com" <wanpengli@...cent.com>,
        "jmattson@...gle.com" <jmattson@...gle.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>,
        "thomas.lendacky@....com" <thomas.lendacky@....com>,
        "gary.hook@....com" <gary.hook@....com>,
        "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
        "davem@...emloft.net" <davem@...emloft.net>
Subject: Re: [PATCH v2] KVM: SVM: Fix "error" isn't initialized

> From e7f9c786e43ef4f890b8a01f15f8f00786f4b14a Mon Sep 17 00:00:00 2001
> From: Haiwei Li <lihaiwei@...cent.com>
> Date: Wed, 27 Nov 2019 15:00:49 +0800
> Subject: [PATCH v2] fix: 'error' is not initialized
>
> There are a bunch of error paths were "error" isn't initialized.
> @@ -155,6 +155,8 @@ static int __sev_do_cmd_locked(int cmd, void *data, int *psp_ret)
>   	unsigned int phys_lsb, phys_msb;
>   	unsigned int reg, ret = 0;
>
> +	*psp_ret = -1;
> +
>   	if (!psp)
>   		return -ENODEV;
>

The arg psp_ret may be NULL in some path such as sev_guest_df_flush(NULL).
So you have to check it against NULL.
Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ