From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2285AC433F5 for ; Thu, 28 Oct 2021 01:24:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 058D0610E5 for ; Thu, 28 Oct 2021 01:24:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbhJ1B0r (ORCPT ); Wed, 27 Oct 2021 21:26:47 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:29944 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbhJ1B0q (ORCPT ); Wed, 27 Oct 2021 21:26:46 -0400 Received: from dggeml757-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Hfnls5mNrzbnK9; Thu, 28 Oct 2021 09:19:37 +0800 (CST) Received: from [10.67.103.22] (10.67.103.22) by dggeml757-chm.china.huawei.com (10.1.199.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.15; Thu, 28 Oct 2021 09:24:17 +0800 Message-ID: Date: Thu, 28 Oct 2021 09:24:12 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: drivers/crypto: suspected missing null check in hisi_qm_pre_init To: YE Chengfeng , "herbert@gondor.apana.org.au" , "davem@davemloft.net" CC: "linux-kernel@vger.kernel.org" References: From: Zhou Wang In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.22] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeml757-chm.china.huawei.com (10.1.199.137) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Hi, > > https://github.com/torvalds/linux/blob/master/drivers/crypto/hisilicon/qm.c#L3286 > > We notice that at #line 3286, the return pointer of ACPI_COMPANION is not null-checked, and then it's dereferenced in acpi_device_power_manageable. Seems that it could be a potential null-pointer-dereference issue. > > This is detected by our experimental static analysis tool, it could be false positive, so we manually check and report those we think may be true bugs. Would you like to have a look at them? If it's real bug, we could like to provide patch to ease your workflow. Hi Chengfeng, It will reture NULL when ACPI is disabled, however this driver deponds on ACPI, which is already set in Kconfig. So no need do null-checked here. Thanks, Zhou > > Thanks so much, > Chengfeng > . >