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: <425f4bdd-cf55-6537-28bf-0377564b531b@huawei.com>
Date:   Wed, 5 Aug 2020 09:58:00 +0800
From:   "shenyang (M)" <shenyang39@...wei.com>
To:     Markus Elfring <Markus.Elfring@....de>,
        Sihang Chen <chensihang1@...ilicon.com>,
        <linux-crypto@...r.kernel.org>
CC:     <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Zaibo Xu <xuzaibo@...wei.com>,
        Zhou Wang <wangzhou1@...ilicon.com>
Subject: Re: [PATCH v4 01/10] crypto: hisilicon/qm - fix wrong release after
 using strsep



On 2020/8/5 2:34, Markus Elfring wrote:
> …
>> +++ b/drivers/crypto/hisilicon/qm.c
>> @@ -1420,16 +1420,17 @@ static int qm_dbg_help(struct hisi_qm *qm, char *s)
> …
>> +	s_tmp = s;
>>  	presult = strsep(&s, " ");
>>  	if (!presult) {
>> -		kfree(s);
>> +		kfree(s_tmp);
>>  		return -EINVAL;
>>  	}
>
> -		kfree(s);
> -		return -EINVAL;
> +		ret = -EINVAL;
> +		goto free_tmp;
>
> I suggest to add a jump target for the desired exception handling.
>
> Regards,
> Markus
>
> .
>

Thanks for your review. There is only one error branch need to do
something uninit. So I think the jump is not necessary and will
affect code reading.:)

Thanks,
Yang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ