Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3903721iog; Tue, 21 Jun 2022 08:10:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tILIbxppXgyLuNJ1M/R+eUst8jNJZePsIhnea9p57hKl4uHy+1l/6A+us+y8Wveem3H+aj X-Received: by 2002:aa7:cd66:0:b0:435:74d5:2d58 with SMTP id ca6-20020aa7cd66000000b0043574d52d58mr18331973edb.34.1655824249860; Tue, 21 Jun 2022 08:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655824249; cv=none; d=google.com; s=arc-20160816; b=nCeKOKjyJF+Gr0cj/rzIOKh4GwRs7B6+67tDQLUgJ18K6BBf3aWwJDVeTap/82jWF+ 8lXfAvo/AFyXMczS2tQD+/OHxB5HkFUg30pXw44Ev1WkYWXANSY2voJ9HN56Wof9m6N/ 8nta4E8dOKkyji50u01oECgLKWmULEPGvtks1inBfwbqEmF/EW/f6gABoxfa+sPC2sG8 dwZk/kLG7vM1VcEvWU+gl+QHScKNNn6hMyESho8+vYEcb+xhdsRrdqPdvoNtZZbWV1oC dAE6hBY0xddblJNlilxQ5XEAyBIYjuaVaNBgLt97ppe3PhcSkAj/+k1+jlAZ/lj9HPAi WubQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1rB5dhIWsiOfdx3wxPlSbjbB/wMmHmlZ15YC1qwwfj0=; b=V5D8PlFaxwcBACl/4AUNAWoBknEJrvxvJV46lLQPx0WIQ09B62rLsumKOjFCFrY3IQ xR5yYf68N9QFQPvxaTbZCDOdreY7Rb5jrDF6B7cQXk3h78M/HwPzmsd8aernvavkLNRi XFh6b6nlX7+xvT0OtPGzse5Z7wdpL2UEAj4FeDCMNXRVyKBRjLWRFaYHUAygtQeJ5QNP Yp3FTXlHIY2ZBe8K4UMmEjbtvT/4CSYePUA4ge72NfS3+tpRChup610xu/jtHKI+Je61 I9kVdG9S82jqMYTjutPZPcZaXBjMb8kaINCDtFQgtio+6qsPvmZhxPR7UNEAlN6VJ4bW yImw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rutlupmv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm10-20020a170907948a00b006e87c1deef1si17618351ejc.176.2022.06.21.08.10.21; Tue, 21 Jun 2022 08:10:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rutlupmv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351329AbiFUOkp (ORCPT + 99 others); Tue, 21 Jun 2022 10:40:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349156AbiFUOko (ORCPT ); Tue, 21 Jun 2022 10:40:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC58F237D4 for ; Tue, 21 Jun 2022 07:40:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 59EE4616BF for ; Tue, 21 Jun 2022 14:40:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5CE7C341C0; Tue, 21 Jun 2022 14:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655822442; bh=w320+wuqbFHvuGQ3W4guubYrnJKxDF19Xrl56Eu3yHE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RutlupmvxTM2WBwYvITX5xNCm/wKJpI1hJPG0OmWn1IjpLSP9S5Iipo8ivtuNZa4N SREWd6vu3fuliQ3quyD4ngv9hfRsSPJwe7og85nudLkf5uosLDZU/FDofT/Ih0DpdQ qO5Nm12xtVGTxffcoEdNz/BVAmwvl5ZbrD9R/2ZgXQtrqO+4IrCESYxy3aPR0922bF LfunBWPeels2/RJolz24Xc2RHqsK8Ep/RJqsuV3XNyah0Imp31NC/FUBAdAml2QYfd JSMEvt3F77KtVcXwjB+pj6MS8gprWfJjbUBfGB6O63rqbtTPYfCctPYcJ3LBB6Z6Nb Xf9pQZO9CTIwg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1o3f3V-00078B-8q; Tue, 21 Jun 2022 16:40:37 +0200 Date: Tue, 21 Jun 2022 16:40:37 +0200 From: Johan Hovold To: Dongliang Mu Cc: vireshk@kernel.org, elder@kernel.org, Greg KH , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel Subject: Re: Unitialized Variable and Null Pointer Dereference bug in gb_bootrom_get_firmware Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 21, 2022 at 10:36:04PM +0800, Dongliang Mu wrote: > Hi maintainers, > > I would like to send one bug report. > > In gb_bootrom_get_firmware, if the first branch is satisfied, it will > go to queue_work, leading to the dereference of uninitialized const > variable "fw". If the second branch is satisfied, it will go to unlock > with fw as NULL pointer, leading to a NULL Pointer Dereference. This sounds like the false positive that checkers keep tripping over. Please double check your analysis and search the archives first. Johan