From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A005A04DE; Fri, 30 Oct 2020 14:01:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 231A1C924; Fri, 30 Oct 2020 14:01:36 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 0A10BC916 for ; Fri, 30 Oct 2020 14:01:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604062892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=C2gVosBHm0fZO5faq2dbavtvC3gOR07StAv/TrL7y8I=; b=RWd4xemcgnGZRjm0n1RhzkBw6RXCT3FIw4p7uT9eHNfxGI/rJ8da0Sb4FTXFUyoyU4WzLR IMDW8vAX9enbREIUMO3C1r+1x1u8M8DY+zjd1pYic63sJitSW4tPGCCnQqrYNh/kMMBjNM 9KZw/YWE99tLLa7fDhNqmgHRBGDZhq0= Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-490-aSYisK0yOFS4AnCHe_HynQ-1; Fri, 30 Oct 2020 09:01:29 -0400 X-MC-Unique: aSYisK0yOFS4AnCHe_HynQ-1 Received: by mail-vs1-f69.google.com with SMTP id u22so1536946vsg.4 for ; Fri, 30 Oct 2020 06:01:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C2gVosBHm0fZO5faq2dbavtvC3gOR07StAv/TrL7y8I=; b=TfONEqQudwAGyh/6DgFY0niLPEy4LmWnDcL3PdxpvUq3DhiZN2NG00J6nQ56xrx8N5 J4CEyQOPVBhywLS1WUIsq5ZHmeyCIfrPzBzgdliBpQetvWrCqZZpq1hcD4EcRdn4/LHI OuSr4opKZGbJZ5jLb2xUcNimAlxSTtFy2VpvpqPB76+J52hXTv4fOS0totqNdU9FcR4V Tc5mRsx0pBbx2LJK7w8uleCtEBVrLK8/+RiGsraLoqpm27R3Zsw9bBFDr0ME+9EQtJfI Zrd4TJUTCpgR8M/ENcZ+7dZDonkHJtkLSnLDA1EY+sLKYvkGQ8hqpB1qwljCDxeumrTh ukmg== X-Gm-Message-State: AOAM530EXH8R0nFqsLyzQ9xP4gAqLYBLl+2TiaFeTtAzjSwNYDDSuX+h J1e4N0aS6KaC7fNrQt1S6upumwTqE2PGbXtIgvmDbBMBfNQfsgG8ou4gJNNn7YNziKrLHf2S1XF sftAMVupxf5Yq4SP0KOY= X-Received: by 2002:a67:2fca:: with SMTP id v193mr7150788vsv.18.1604062888668; Fri, 30 Oct 2020 06:01:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4s6tubpB9y7jnVEqqILapZbjH6DMw+zSSzfQt01ZrMHLcygfaa2hNuWaBwn66ifLaPu73OKV9PJjfu+I8fqw= X-Received: by 2002:a67:2fca:: with SMTP id v193mr7150755vsv.18.1604062888451; Fri, 30 Oct 2020 06:01:28 -0700 (PDT) MIME-Version: 1.0 References: <20201028153808.103328-1-ciara.power@intel.com> In-Reply-To: <20201028153808.103328-1-ciara.power@intel.com> From: David Marchand Date: Fri, 30 Oct 2020 14:01:15 +0100 Message-ID: To: Ciara Power Cc: dev , "Kovacevic, Marko" , Fan Zhang , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] examples/fips_validation: fix checking return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Oct 28, 2020 at 4:38 PM Ciara Power wrote: > > The return value was not being checked when calling the > get_writeback_data function in the AES test case. On failure, this led > to a NULL dereference when using memcpy later. The return value is now > checked to avoid this NULL dereference. > > Coverity issue: 363463 > Fixes: cd255ccf5764 ("examples/fips_validation: support AES parsing") I'd rather flag: Fixes: 952e10cdad5e ("examples/fips_validation: support scatter gather list") Can you double check? > Cc: marko.kovacevic@intel.com > Cc: roy.fan.zhang@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Ciara Power > --- > examples/fips_validation/main.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c > index 07532c9562..bc7abd2b8f 100644 > --- a/examples/fips_validation/main.c > +++ b/examples/fips_validation/main.c > @@ -1520,7 +1520,9 @@ fips_mct_aes_test(void) > return ret; > } > > - get_writeback_data(&val); > + ret = get_writeback_data(&val); > + if (ret < 0) > + return ret; > > if (info.op == FIPS_TEST_DEC_AUTH_VERIF) > memcpy(prev_in, vec.ct.val, AES_BLOCK_SIZE); And I think we have the same issue in fips_mct_sha_test(). -- David Marchand