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 X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3124C433EF for ; Thu, 16 Sep 2021 13:10:22 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 375B9611C4 for ; Thu, 16 Sep 2021 13:10:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 375B9611C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38BE282F4D; Thu, 16 Sep 2021 15:10:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="T8HiMzIE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DFF1A82F28; Thu, 16 Sep 2021 15:10:17 +0200 (CEST) Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) (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 1702582F4D for ; Thu, 16 Sep 2021 15:10:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=oleksandr.suvorov@foundries.io Received: by mail-lf1-x134.google.com with SMTP id i25so18425455lfg.6 for ; Thu, 16 Sep 2021 06:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JoMv+zbGRjRIDsdsAeR+F6C1q5drvd58BX4CKbrHzWU=; b=T8HiMzIEERsuY/l0S6Qv7CJAWb8f390z99+oijpybJ/gLYh4W+O0Fyn1AB5JpwlDgN rkTvC52Q6O0ou9oVnRXYSBuRXbII/TgHICJboHrRGPVqq0Oi5Kucs8cn5SRXJKnaaiSk SYCqqCS8bbe1uwjAdWO0HTkhGE+kVkRtgADj0iaYiH7QQmLG3vWs1qMpzMUSMJPpVFUl hvQaODvCzu/QsNb0XI0vzXgFKPGxJy7Y2oDA0SMcHg/ssDGX2JX0skUMGDAirWlMg/Rw 8kHHiKiLKRYEwhZ3YBFKvIUsrmkx50qfbHfiZiR32pdOzJKRkYOVK7emkfqgyoU1rTiL D4GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JoMv+zbGRjRIDsdsAeR+F6C1q5drvd58BX4CKbrHzWU=; b=N4JS4RwlgUOty7kzXAzQwrLLhpaMnxHZmNJ2jy9plQTj5jQp4rXqyXlSq8jnv7vbFE 1e2UvF8m/78PkQ8tpMaZwfvwGZw80MaRsgPvs4ii/J52fEPZbJyC5vxIumuuhdHlZxTP Sz8S9+40+jl54W14H7EwbOsvWXMxH35Kq/VXYx0TtV/eM+NJTLFFeu5smmuPEUz/0pgb APmmcGbecd66BlHITjfY0FT9XFXpkN8CVTjmdcH1IKhjoRo7RQ6sCGWNGLLBApo7O/Fv tI710AA04BZoO6DloFC7huyxa2DYavwQJICYOG6ELakl2Q0HEpOhDXKJI9fkg76DTn4t ZuEw== X-Gm-Message-State: AOAM532F7Bm5pYkaBHExX8cZgX0QH5/pKCDOvBcwnaEHursH5RtRANLq 3/Z1WMSfryXXgOGZcxt/NrnSTpMKfKCPxQ== X-Google-Smtp-Source: ABdhPJyPrN27ypeUzQ0a60eAbreHeBLfUuCeYmyOjxlBSohG6mClWmWa4Fy1ZiEjCuB4J58XkgFhyg== X-Received: by 2002:a2e:9b91:: with SMTP id z17mr4233777lji.437.1631797809134; Thu, 16 Sep 2021 06:10:09 -0700 (PDT) Received: from localhost.localdomain ([82.193.109.226]) by smtp.gmail.com with ESMTPSA id f9sm256525lfp.273.2021.09.16.06.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 06:10:08 -0700 (PDT) From: Oleksandr Suvorov To: u-boot@lists.denx.de Cc: Oleksandr Suvorov , Alexandru Gagniuc , Bin Meng , Henry Beberman , Klaus Heinrich Kiwi , Marek Vasut , Masahisa Kojima , Michal Simek , Philippe Reynes , Ricardo Salveti , Simon Glass , Steffen Jaeckel Subject: [PATCH 0/2] Enable strict signature verification for FIT Date: Thu, 16 Sep 2021 16:09:56 +0300 Message-Id: <20210916130958.306964-1-oleksandr.suvorov@foundries.io> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean FIT load checks the signature on loadable images, but just continues in the case of a failure. This is undesirable behavior because the boot process depends on the authenticity of every loadable part. Add a check that verifies the FIT's configuration block, and fails if it's not present or the signature doesn't match. Henry Beberman (1): spl: Add CONFIG_SPL_FIT_SIGNATURE_STRICT Ricardo Salveti (1): cmd: Add CONFIG_FIT_SIGNATURE_STRICT cmd/fpga.c | 14 ++++++++++++++ cmd/source.c | 14 ++++++++++++++ cmd/ximg.c | 14 ++++++++++++++ common/Kconfig.boot | 11 +++++++++++ common/spl/spl_fit.c | 21 ++++++++++++++++++++- 5 files changed, 73 insertions(+), 1 deletion(-) -- 2.31.1