From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id 05CD45B3A for ; Mon, 30 Jul 2018 18:21:31 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkArt-00009D-GP; Mon, 30 Jul 2018 16:17:57 +0000 From: Christian Ehrhardt To: Pablo de Lara Cc: Fiona Trahe , dpdk stable Date: Mon, 30 Jul 2018 18:12:55 +0200 Message-Id: <20180730161342.16566-130-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'examples/l2fwd-crypto: check return value on IV size check' has been queued to stable release 18.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 16:21:31 -0000 Hi, FYI, your patch has been queued to stable release 18.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From b7bb17845f9394c500109dd763ec375ed46d446b Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Thu, 19 Jul 2018 09:39:55 +0100 Subject: [PATCH] examples/l2fwd-crypto: check return value on IV size check [ upstream commit 53b9a5b66d6e2df2e0d92586d6636f03c529ea1a ] IV size parameter is checked through a function, but its return value was not checked. Fixes: 0fbd75a99fc9 ("cryptodev: move IV parameters to session") Fixes: acf8616901b5 ("cryptodev: add auth IV") Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters") Signed-off-by: Pablo de Lara Acked-by: Fiona Trahe --- examples/l2fwd-crypto/main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 41c99cc04..646512da6 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -2049,10 +2049,11 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, options->block_size = cap->sym.aead.block_size; - check_iv_param(&cap->sym.aead.iv_size, + if (check_iv_param(&cap->sym.aead.iv_size, options->aead_iv_param, options->aead_iv_random_size, - &options->aead_iv.length); + &options->aead_iv.length) < 0) + return -1; /* * Check if length of provided AEAD key is supported @@ -2157,10 +2158,11 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, options->block_size = cap->sym.cipher.block_size; - check_iv_param(&cap->sym.cipher.iv_size, + if (check_iv_param(&cap->sym.cipher.iv_size, options->cipher_iv_param, options->cipher_iv_random_size, - &options->cipher_iv.length); + &options->cipher_iv.length) < 0) + return -1; /* * Check if length of provided cipher key is supported @@ -2213,10 +2215,11 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, if (cap == NULL) continue; - check_iv_param(&cap->sym.auth.iv_size, + if (check_iv_param(&cap->sym.auth.iv_size, options->auth_iv_param, options->auth_iv_random_size, - &options->auth_iv.length); + &options->auth_iv.length) < 0) + return -1; /* * Check if length of provided auth key is supported * by the algorithm chosen. -- 2.17.1