Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp666285rdf; Tue, 21 Nov 2023 12:55:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IH86Yz8f8Uq5rDr6WN1wJvv3329rFOXTS9jSDBu3qZ2YZq98HmCqXSg+MLkyy9EFmNTBS56 X-Received: by 2002:a05:6830:1da4:b0:6d6:9ecf:8d8c with SMTP id z4-20020a0568301da400b006d69ecf8d8cmr615787oti.3.1700600107737; Tue, 21 Nov 2023 12:55:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700600107; cv=none; d=google.com; s=arc-20160816; b=epWjO87zDu5P13I1OtjyiPAm7UqwKNYG41lhW3ytdvlr4GsintQFYBacP2pGaxy7t8 it4WwnxOQoGm9S5ipfN1SEB3Llb/N02pamo1PPhwJ9NkodTpodfZny1i0mYJCiWqsnj/ FCG/JOJVVbJDQRlFHSfQuS+JBg2K7VRjsLYYYT5EBzXNStj4IPlSgtj2CLRrpWF3/AYz rGtfkRDMJX2i1qq0BY25TSPqtI0myvg0ISmZZ+jV4tJHGlGHbJdkJrGIPbkxqvh9aRyA 4wSVqQHmfFiXbnJzZ5rmiVm/0NMUxVgoiFT13oNRgFc2RHOjNBrluBs1ihea5Cya3zpJ 02mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:autocrypt:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=gAdLoiSu3A06i/pN1QjJG/0pZw4xkhyOo7UV0xtTOrM=; fh=9Z5sKqXAFh+ydwCAd9HjAo/5Xy77YZtY2Is3+XG3p1I=; b=eLic6mLSkxNSEZCtstS5jmgNaFcI/wslqyYzskl2ZX7alP8bnhFQi3id7jRRXbSrwd ten+ZseB19vfyzgK32azcKWLUny7UigTwH2OJ5sgAE1A2I9OuA7IS8sRBHKMWIU5pFyq Ga8Fm2fdX/8N5nRPzCoThZcM7IAmaE/V+ohQONc0Z3wBXPv8ix7QKJY4rDZZmSqdXOI1 vt/fqHvzcSMpMgiokIEjOETznQW0/NFU5AepaHSHzIyDdMre83NI6nhntyKnUQyRX1FK 7XrLSM9RgOJiROjt8PrHi6hACd3C+LyHyS2RqbPqU6Ql2zSeDcoocM8qaEPWxA748uFQ QASw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l6QuB6h0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id cm11-20020a056a020a0b00b005aaefc07ccfsi11396763pgb.36.2023.11.21.12.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 12:55:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l6QuB6h0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 098A8808EE56; Tue, 21 Nov 2023 12:55:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229524AbjKUUyo (ORCPT + 99 others); Tue, 21 Nov 2023 15:54:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbjKUUyn (ORCPT ); Tue, 21 Nov 2023 15:54:43 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA2E919E for ; Tue, 21 Nov 2023 12:54:38 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D78A8C433C7; Tue, 21 Nov 2023 20:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700600078; bh=GyHN4wCOMA8c6nPwQG+j0NoaqWqZE4TlER9FWsCywLo=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=l6QuB6h0ZmMyA+kEHo0OihyS7AcrZlKV05jgRPUt0y3RxWlmN2z1O140qnaqpQgmf IHu/xhzVG3pcsQAHwHQF1uhjzH5aNMMq9Qq4LHONJfp4dnhJQNazfH6QlSl7GNq5zL dFMlIqCh4gWsnHMa0VWTE3JoxhIDmWjk2O4FyieAdPGg0vhiUK4zUqs/HlpfWHApwa j6hwjquCTDYnMa1mYZ/lEQcXlVo1hxB+ncICI1GmZtoiBmGDqHotm5MaCgO9LwwVZn JPDkiSNChbPGKIsXJxxVvWgHlAIoO+BeHvM3A+E/51prSkA4kqH1yR5McuRJZj821k wTtV8xWgF/rPw== Message-ID: <89f0dbe3a390dd2d49b09c0ff75a142aa44793fd.camel@kernel.org> Subject: Re: [PATCH v3] sign-file: Fix incorrect return values check From: Jarkko Sakkinen To: Yusong Gao , davem@davemloft.net, dhowells@redhat.com, dwmw2@infradead.org, juergh@proton.me, zohar@linux.ibm.com, herbert@gondor.apana.org.au, lists@sapience.com, dimitri.ledkov@canonical.com Cc: keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Date: Tue, 21 Nov 2023 22:54:33 +0200 In-Reply-To: <20231121034044.847642-1-a869920004@gmail.com> References: <20231121034044.847642-1-a869920004@gmail.com> Autocrypt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zGd3/cCrL7xS82PguDXopi6oZycp9LpfKKWL7BWmkQT8lgbSrm+QNY4DzMiNPhcqMb+8Yj+V7kqbBS/yWV/kbl5CrI5P/Iz4ZeqKrh07dKUJaj+RGaifW3cZFx/VCHqLxVfa3DwrHtFwQops4/lewpCqBtfx9UWGHRZIfn2Y9EEEmx94ymhO3nN3bVo0GZHCgfcvSDbFgNEefbakVoCAMq6/oiPZTRN0bxktVC7r36lybcbRdCX+MF6OXZb/jjJ71WzkhThEaA+NXx6uaxOvIhgOU0h1qLFkxPpESEYolyhRSs2urvTtbFG/PqHHGlxrl2vLaRee5YJDfvpar+unOY44lfYVdvqd3udMbXhb7FFfajz0iSsok4VwEkh/6BCZ+x8sMSueroMf1jMFs N1LK7Vr OhxtP1vYUoyv1iQpYsijVlqHhqbA7Va/jVwBJi40tjMFS0E91mK1iRtBzA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 21 Nov 2023 12:55:01 -0800 (PST) On Tue, 2023-11-21 at 03:40 +0000, Yusong Gao wrote: > There are some wrong return values check in sign-file when call > OpenSSL > API. The ERR() check cond is wrong because of the program only check > the > return value is < 0 instead of <=3D 0. For example: > 1. CMS_final() return 1 for success or 0 for failure. > 2. i2d_CMS_bio_stream() returns 1 for success or 0 for failure. > 3. i2d_TYPEbio() return 1 for success and 0 for failure. > 4. BIO_free() return 1 for success and 0 for failure. >=20 > Link: https://www.openssl.org/docs/manmaster/man3/ > Fixes: e5a2e3c84782 ("scripts/sign-file.c: Add support for signing > with a raw signature") >=20 No empty line here. > Signed-off-by: Yusong Gao > --- > V1, V2: Clarify the description of git message. > --- > =C2=A0scripts/sign-file.c | 12 ++++++------ > =C2=A01 file changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/scripts/sign-file.c b/scripts/sign-file.c > index 598ef5465f82..dcebbcd6bebd 100644 > --- a/scripts/sign-file.c > +++ b/scripts/sign-file.c > @@ -322,7 +322,7 @@ int main(int argc, char **argv) > =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 CMS_NOSMIMECAP | use_keyid | > =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 use_signed_attrs), > =C2=A0 =C2=A0=C2=A0=C2=A0 "CMS_add1_signer"); > - ERR(CMS_final(cms, bm, NULL, CMS_NOCERTS | > CMS_BINARY) < 0, > + ERR(CMS_final(cms, bm, NULL, CMS_NOCERTS | > CMS_BINARY) <=3D 0, > =C2=A0 =C2=A0=C2=A0=C2=A0 "CMS_final"); > =C2=A0 > =C2=A0#else > @@ -341,10 +341,10 @@ int main(int argc, char **argv) > =C2=A0 b =3D BIO_new_file(sig_file_name, "wb"); > =C2=A0 ERR(!b, "%s", sig_file_name); > =C2=A0#ifndef USE_PKCS7 > - ERR(i2d_CMS_bio_stream(b, cms, NULL, 0) < 0, > + ERR(i2d_CMS_bio_stream(b, cms, NULL, 0) <=3D > 0, > =C2=A0 =C2=A0=C2=A0=C2=A0 "%s", sig_file_name); > =C2=A0#else > - ERR(i2d_PKCS7_bio(b, pkcs7) < 0, > + ERR(i2d_PKCS7_bio(b, pkcs7) <=3D 0, > =C2=A0 =C2=A0=C2=A0=C2=A0 "%s", sig_file_name); > =C2=A0#endif > =C2=A0 BIO_free(b); > @@ -374,9 +374,9 @@ int main(int argc, char **argv) > =C2=A0 > =C2=A0 if (!raw_sig) { > =C2=A0#ifndef USE_PKCS7 > - ERR(i2d_CMS_bio_stream(bd, cms, NULL, 0) < 0, "%s", > dest_name); > + ERR(i2d_CMS_bio_stream(bd, cms, NULL, 0) <=3D 0, "%s", > dest_name); > =C2=A0#else > - ERR(i2d_PKCS7_bio(bd, pkcs7) < 0, "%s", dest_name); > + ERR(i2d_PKCS7_bio(bd, pkcs7) <=3D 0, "%s", dest_name); > =C2=A0#endif > =C2=A0 } else { > =C2=A0 BIO *b; > @@ -396,7 +396,7 @@ int main(int argc, char **argv) > =C2=A0 ERR(BIO_write(bd, &sig_info, sizeof(sig_info)) < 0, "%s", > dest_name); > =C2=A0 ERR(BIO_write(bd, magic_number, sizeof(magic_number) - 1) < > 0, "%s", dest_name); > =C2=A0 > - ERR(BIO_free(bd) < 0, "%s", dest_name); > + ERR(BIO_free(bd) <=3D 0, "%s", dest_name); > =C2=A0 > =C2=A0 /* Finally, if we're signing in place, replace the original. > */ > =C2=A0 if (replace_orig) BR, Jarkko