Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp728372rwl; Wed, 5 Apr 2023 07:03:17 -0700 (PDT) X-Google-Smtp-Source: AKy350ap6Pi5Nt8OCbKMoBAQIwHgMEW8fTc8JIB520ZC6c9UcHOnhC44NRGIKai36E8ReYyXNBW2 X-Received: by 2002:a17:907:7671:b0:8b1:3131:76e9 with SMTP id kk17-20020a170907767100b008b1313176e9mr2609607ejc.46.1680703396895; Wed, 05 Apr 2023 07:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680703396; cv=none; d=google.com; s=arc-20160816; b=yckIv2gYbH2FDrvGgqRlFbE67lfZkIWgD1exL8GIs01LDmFzKf9xB8tEWZnqwh4LZD KpKUz5SQBoAAYheKUgLzLzFXmD6aSi+8RAjp3TioQv66NlQc+WC4d8dj4p3evj6cQo1c Z9dGiBrCCLFTerpKxU8H8P8hXTNsqUmi43MgqROiCuhp+zW/oiyHgvi4+ubF6/ducKnG 4Ve/ididXg9j6XAemtBk2fCB22wVx/xJSa8EXY4qsUjlPFTFCp5hWLXrY+2c0MUDJbT3 CvotvIFIc5rAre0/f8qlEMVoionbB8tTPH8nLwxk18vW2qxwmF9W+LqId1ldBIKHKpap UnsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=A9j4Dy4j5hqa3xtUvECBaY59L/Bdcpss3s4DZ+YqOa4=; b=gE2DAwwFH/HEsWT9FDfpfu2TIdAAUUqihub2EKir2+zR8on4AY5AeDF01Hu76U9B1I 1Dx/7TXk8EdzBv6t3BuICaOMNpA94JykuvnNFJyvSVYLb3A/slw094Ki0hNPD87KpoYT 0YhUtNIBxFHXLgnwIriQ2Go71YDdJHqj8toaizzbKMYar0nmwR6ahpsxHt4KLfACpjxv 8rPtSB5NnIh/7W0TmWRvDDEkKaBFF77QGzfyEy1rZBP+aJ2sOu2C+gX1huTLabwMrsfO 9X7qI9XOA76EGWmiztGTX+m1iRmCKIJN19FdO/sPkVu9oyDq83L1itfUWiCLHg3q5jHE aRSg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a170906a38100b009333f8775a1si1561704ejz.182.2023.04.05.07.02.48; Wed, 05 Apr 2023 07:03:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238205AbjDEOAs (ORCPT + 99 others); Wed, 5 Apr 2023 10:00:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238144AbjDEOAm (ORCPT ); Wed, 5 Apr 2023 10:00:42 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7188613E; Wed, 5 Apr 2023 07:00:41 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id dcf2d61551abffaa; Wed, 5 Apr 2023 16:00:39 +0200 Received: from kreacher.localnet (unknown [213.134.163.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 42FEE1B4EA57; Wed, 5 Apr 2023 16:00:39 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 30/32] ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects Date: Wed, 05 Apr 2023 15:57:57 +0200 Message-ID: <3219383.AJdgDx1Vlc@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 From: void0red <30990023+void0red@users.noreply.github.com> ACPICA commit 0d5f467d6a0ba852ea3aad68663cbcbd43300fd4 ACPI_ALLOCATE_ZEROED may fails, object_info might be null and will cause null pointer dereference later. Link: https://github.com/acpica/acpica/commit/0d5f467d Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/dbnames.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/acpica/dbnames.c b/drivers/acpi/acpica/dbnames.c index 3615e1a6efd8..b91155ea9c34 100644 --- a/drivers/acpi/acpica/dbnames.c +++ b/drivers/acpi/acpica/dbnames.c @@ -652,6 +652,9 @@ acpi_status acpi_db_display_objects(char *obj_type_arg, char *display_count_arg) object_info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_object_info)); + if (!object_info) + return (AE_NO_MEMORY); + /* Walk the namespace from the root */ (void)acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, -- 2.35.3