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 BDCF1C7EE29 for ; Thu, 25 May 2023 14:05:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8BCE7860BD; Thu, 25 May 2023 16:05:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="sRZ+/pe9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3F78A860CF; Thu, 25 May 2023 16:05:35 +0200 (CEST) Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 780AD860BB for ; Thu, 25 May 2023 16:05:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-56204ac465fso7946077b3.2 for ; Thu, 25 May 2023 07:05:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1685023531; x=1687615531; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Ap4J1mpVnKqlemuERWJ14xil2sTTg12UZAPpb40Uhfw=; b=sRZ+/pe9ViNdCRuwT2A16h8L0qKK6/aEDkc8l4qQ56V9x0FPn6v52O4TWyI4oYRpeN gT3A2wGt5FFu4AG2YSH+vFfKKahuJL4QcwB5zl/jkOcorzAKU0i1+Lt/1dE2fOcRdlIc sb379ru6iswG7KAp3/uKN1r2xIP/xurRtfyRY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685023531; x=1687615531; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ap4J1mpVnKqlemuERWJ14xil2sTTg12UZAPpb40Uhfw=; b=VXvQZ+g4CdpgjaLWChk7HbqJeqIjSpsgje6T5Ha+JhLcEJoFFqLVLwBLHdZ0qW3/9L EWZabQS8pu4pqo1Od5M1PpBEOpvNFtkVQPyoj9K748IwsNeHWzoqNfayVaiKYMkHWGzg VtanN1Lb0+TLLS/WYM+TY0KnKdRcA1voteYyt/7a6tyz4ljA7q9y29gDRiii36T3N2p/ Pujd9mF6aqFv6HxXJz8JKQmr/c/2+JiPgP03hRDIvnRKDl0IK14uTXX1yPTEkz3InRQ+ lc61K58wyJG52K4L3MC2xHYwbgi7L8xxuQmgN8SCz1SZ2wyB7YpsQG99jD7Q9qmLkqVd WA+w== X-Gm-Message-State: AC+VfDxn0OCT7Op0qxMBhmW5+Ps0k1cKor3y5ZaHgAd4UFUfGq9EL8E+ QP69Vkdu8Ws4y7IAO5eRuXw+Kg== X-Google-Smtp-Source: ACHHUZ6guxDy+oGEozkNtBxOIf5StWkKuPOe2XIi3eANjnE3iJKY76GvsufEbBXNBIC7uV3qv7T9Ig== X-Received: by 2002:a0d:c105:0:b0:562:17d6:eb3f with SMTP id c5-20020a0dc105000000b0056217d6eb3fmr21098190ywd.6.1685023531097; Thu, 25 May 2023 07:05:31 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-6c4a-4518-3847-3f24.res6.spectrum.com. [2603:6081:7b00:6400:6c4a:4518:3847:3f24]) by smtp.gmail.com with ESMTPSA id l185-20020a0de2c2000000b00559d1eabc3csm389878ywe.79.2023.05.25.07.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 May 2023 07:05:30 -0700 (PDT) Date: Thu, 25 May 2023 10:05:28 -0400 From: Tom Rini To: Manorit Chawdhry Cc: u-boot@lists.denx.de, Praneeth Bajjuri , Andrew Davis , Vignesh Raghavendra , Udit Kumar , Simon Glass , Kamlesh Gurudasani Subject: Re: Fit Signature booting without public key Message-ID: <20230525140528.GL3218766@bill-the-cat> References: <20230516064124.n2qd4dununi2bymx@ula0497581> <20230516153006.GG2398826@bill-the-cat> <20230525055144.5p7fpqmckhmzwtjm@ula0497581> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aoIeH0aMNaFPsjnL" Content-Disposition: inline In-Reply-To: <20230525055144.5p7fpqmckhmzwtjm@ula0497581> X-Clacks-Overhead: GNU Terry Pratchett 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 --aoIeH0aMNaFPsjnL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 25, 2023 at 11:21:44AM +0530, Manorit Chawdhry wrote: > Hi Tom, >=20 > On 11:30-20230516, Tom Rini wrote: > > On Tue, May 16, 2023 at 12:11:24PM +0530, Manorit Chawdhry wrote: > >=20 > > > Hi All, > > >=20 > > > I recently came upon a discussion that had happened a while back [0]. > > > I want to continue the discussion as I believe the issue still persis= ts > > > and the checks around fit signature booting are still the same, that > > > allows booting the fit without changing the uboot dtb. > > >=20 > > > Allowing the signed fit image without this seems to be a bypass that = is > > > available and should not be allowed without any gate to it for people > > > who'd like to enforce these signing checks. Let me know if there is a > > > config already available for it and if not, are there any plans to > > > enable such a config in future. Would like to hear your opinions on > > > this as I believe this should be fixed as soon as possible. > > >=20 > > > [0]: https://u-boot.denx.narkive.com/dEClg9dW/signed-fit-image-boots-= without-public-key > >=20 > > Yes, can you please reproduce the issue in question on the current tree, > > with a supported platform and provide the defconfig and steps you used > > for this issue? Thanks. > >=20 > > --=20 >=20 > I've created a branch with some custom patches to make the fitimage > booting currently, please try with the branch and the fitimage that are > also committed [0]. >=20 > The devices that I've tested this with is j721e-hs-evm, the defconfig to > use for the builds are j721e_evm_r5_defconfig and > j721e_evm_a72_defconfig. Although not synced up with the latest changes > but for reference the SDK documentation can help if required [1]. >=20 > Attached the logs for reference with the signed fitimage and an unsigned > uboot without any modifications[2]. >=20 > [0]: https://github.com/manorit2001/u-boot/tree/fit-image-poc > [1]: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7= /08_06_00_11/exports/docs/linux/Foundational_Components/U-Boot/UG-General-I= nfo.html > [2]: https://gist.github.com/manorit2001/3c49cfc19bf937783efb75fd4cddc58f I don't see the problem there, but please go and investigate what problem you're seeing. The intention is that yes, with the appropriate CONFIG settings, you can set U-Boot to only boot signed FIT configurations and unsigned ones should not boot. --=20 Tom --aoIeH0aMNaFPsjnL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmRvax4ACgkQFHw5/5Y0 tyy9Ugv/Yk+aRrcbyg86zCvWQBW3lJ64uB9LytmG5YQYJN0D8rsUcKFn1kQ05sZt 9SsWR+JJjjtdIBZSYNn1LozpVUuFaAZagxCvd1x//XEJwJJ75gttqv82fsC4yDBV FUgl3TSQtLvz7DPcLkaKDHiDrWXPjJkohA2vnyf1cGR2nxmTi6YDWhlqEnwuMZ/o 00U4IDSGgcA1VGnvzTmE7rl3REb/6mY0jwNdUJPUci88IqvVti4XdTAN/IiAlSPX oPh6aY+thnAB8bHCmdWR0qa6E7LdqEF2S9WoKolzPMvnQ6i+x+MS0RBCjhAQ2S5l MPk3oA661ws/ZsptK7JdrDhFOhFfkwlWX7ba/RNvclrgopGL6+vaaArHdDV400+D rafQTFl/ueVbO7yFrMcq+j86abGpfy4adZ+CPQdm6yAHf133Jf/Kbf0pAmlKozM8 ZZgmAfjPpPzUNAgG6WjiXQAFFkn/8vaDyGwik5FFE59JnJ5oaq3C95gv7n+cbTpJ IZnRsXm+ =edDA -----END PGP SIGNATURE----- --aoIeH0aMNaFPsjnL--