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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6212C5AD49 for ; Tue, 3 Jun 2025 14:25:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A12CB82B27; Tue, 3 Jun 2025 16:25:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="QDj4rAay"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E92982B0F; Tue, 3 Jun 2025 16:25:33 +0200 (CEST) Received: from lelvem-ot01.ext.ti.com (lelvem-ot01.ext.ti.com [198.47.23.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4ED0981E72 for ; Tue, 3 Jun 2025 16:25:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=anshuld@ti.com Received: from fllvem-sh04.itg.ti.com ([10.64.41.54]) by lelvem-ot01.ext.ti.com (8.15.2/8.15.2) with ESMTP id 553EPTwq491582; Tue, 3 Jun 2025 09:25:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1748960729; bh=+TS9Fsw1v8xpOm5lxyLiLhDgZ8qeFNCq/z41EWPKbM8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=QDj4rAayvRBn+Nx4WgSn+suXIaU42zLPC49yxYuzKL5ZvChjpTllSj7HV4x5H+i80 ipx02TjjJdjF4NrapRFcnXijd2k6dcA4WZYwdzjuubli1CTow/MU7WO6P0wU6+83/n 1KU9ej/NFE2ulnQEqjwaXyjIBA7w/oaoMMeOVTiw= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 553EPTkg3663730 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Tue, 3 Jun 2025 09:25:29 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 3 Jun 2025 09:25:29 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 3 Jun 2025 09:25:29 -0500 Received: from localhost (dhcp-172-24-227-250.dhcp.ti.com [172.24.227.250]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 553EPSvJ475308; Tue, 3 Jun 2025 09:25:29 -0500 From: Anshul Dalal To: CC: Anshul Dalal , , , , , , , , Subject: [PATCH v7 02/10] spl: make CMD_BOOTZ exclusive with TI_SECURE_DEVICE Date: Tue, 3 Jun 2025 19:54:42 +0530 Message-ID: <20250603142452.2707171-3-anshuld@ti.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250603142452.2707171-1-anshuld@ti.com> References: <20250603142452.2707171-1-anshuld@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean In the secure OS_BOOT spl execution code path, CMD_BOOTZ enables loading of a zImage which might allow an attacker to bypass the authenticated boot with fitImage by replacing it with a malicious image with header identical to zImage. Disabling CMD_BOOTZ ensures this code path is never hit inside spl_parse_image_header. Signed-off-by: Anshul Dalal --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index f21d27cb27f..4c23f04c699 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -353,6 +353,7 @@ config BOOTM_ELF config CMD_BOOTZ bool "bootz" + depends on !TI_SECURE_DEVICE help Boot the Linux zImage -- 2.49.0