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 8D2DCA051C for ; Tue, 11 Feb 2020 12:24:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 83FDE2B9C; Tue, 11 Feb 2020 12:24:05 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by dpdk.org (Postfix) with ESMTP id 533591BF7B for ; Tue, 11 Feb 2020 12:24:04 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id g3so10781714wrs.12 for ; Tue, 11 Feb 2020 03:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/tRrxz70HIsDC7L+K4dhkQf4YBOeEMGaMtj20PjEjPI=; b=a6l6MKmdcjN8EmNDuvO6eSvlRVDFYtm4q8wY4a7cXNcZ3ht69qaLkC6uOWxYm5vVsW AI/TigsMvRFsaht5pAwSWkhibGUOrrN9VTSu0gCSj2jO2JJLD3Zss7k+maXzauUZuDQw KoVYzcpi9JaKD1p2U9DKz6TIV8Jx+8G+QwmjUvM6OqU58gruCbBSbZpnkKwVaWqL6/0+ GNgMIUVzaATTcVxK2fcsU1XU3w+uY1pAHZ03/CStv59MySKw5ysgCZ9odd9HLKWEnkkh hjVpHOVbTRYfvGb82sEbKp0GX+EUo26cclbclIzXLeQi/z+yhUGo1xBWsNfLagyzLcgD PjVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/tRrxz70HIsDC7L+K4dhkQf4YBOeEMGaMtj20PjEjPI=; b=Jznpy7yBO4a0USD24WGFBGxP3HZ1gqZKpnE8wYv1KEb4eYd9mNR3bHrjMI5sf7XY7M botBmxFs02Jcjs6Cj+4gXjjuXieLeqf00bQxOc0ilFUm5L/mpoKaR/c2mqkYUddpsIUo vUasSHpN9V8jh+lVxrgCJJ16/GEkcGWUHTU68khm8oI1S6QXcI2+dMVa5T0BFmDApjVR R9NgoVJt2yUwhZYCelX4yYRyO/Ah9pppw+nfaC7sEqMpk6YVSKirk3X7fLtmBNgDM4IK kMRdW5HnHj20wPP8BhD8B3/cxeWlCgXlGjD9mZiCzRntllTgrDnAz9JBJAoc5/NtOVGg cE0w== X-Gm-Message-State: APjAAAVB/p79y6ivMkKG1vnoSBmwkkZSf8dBnoPKneaUtutPfk049RIU 5byJxt2MIy5W/NYfqrh0iu0lHnFr X-Google-Smtp-Source: APXvYqx9JdWIiIdaL4fQ4Z8tI/SzeQNv0PdHDdPJDOwfA5Jy7IQOLF3tr4lLkQkToZ1oDhQUCok69w== X-Received: by 2002:adf:f54d:: with SMTP id j13mr8099757wrp.19.1581420244043; Tue, 11 Feb 2020 03:24:04 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v12sm4652900wru.23.2020.02.11.03.24.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:24:03 -0800 (PST) From: luca.boccassi@gmail.com To: Savinay Dharmappa Cc: Konstantin Ananyev , dpdk stable Date: Tue, 11 Feb 2020 11:19:30 +0000 Message-Id: <20200211112216.3929-24-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/ipsec-secgw: fix crash on unsupported algo' has been queued to stable release 19.11.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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.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 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 0846e8aa74cb2eb6040f821821f309f1de930726 Mon Sep 17 00:00:00 2001 From: Savinay Dharmappa Date: Fri, 13 Dec 2019 11:49:55 +0000 Subject: [PATCH] examples/ipsec-secgw: fix crash on unsupported algo [ upstream commit 71d9e6fb2a0d8709e97384b30d81b3bff35da16f ] If algo is NULL set the status to error and return. This change prevent crashing of ipsec-secgw application when a specific cipher/auth/aead algo are not supported by application. Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file") Signed-off-by: Savinay Dharmappa Acked-by: Konstantin Ananyev --- examples/ipsec-secgw/sa.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index 7f046e3ed7..c75a5a15f5 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -314,6 +314,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, APP_CHECK(algo != NULL, status, "unrecognized " "input \"%s\"", tokens[ti]); + if (status->status < 0) + return; + rule->cipher_algo = algo->algo; rule->block_size = algo->block_size; rule->iv_len = algo->iv_len; @@ -378,6 +381,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, APP_CHECK(algo != NULL, status, "unrecognized " "input \"%s\"", tokens[ti]); + if (status->status < 0) + return; + rule->auth_algo = algo->algo; rule->auth_key_len = algo->key_len; rule->digest_len = algo->digest_len; @@ -433,6 +439,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, APP_CHECK(algo != NULL, status, "unrecognized " "input \"%s\"", tokens[ti]); + if (status->status < 0) + return; + rule->aead_algo = algo->algo; rule->cipher_key_len = algo->key_len; rule->digest_len = algo->digest_len; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:40.037537315 +0000 +++ 0024-examples-ipsec-secgw-fix-crash-on-unsupported-algo.patch 2020-02-11 11:17:38.332000075 +0000 @@ -1,14 +1,15 @@ -From 71d9e6fb2a0d8709e97384b30d81b3bff35da16f Mon Sep 17 00:00:00 2001 +From 0846e8aa74cb2eb6040f821821f309f1de930726 Mon Sep 17 00:00:00 2001 From: Savinay Dharmappa Date: Fri, 13 Dec 2019 11:49:55 +0000 Subject: [PATCH] examples/ipsec-secgw: fix crash on unsupported algo +[ upstream commit 71d9e6fb2a0d8709e97384b30d81b3bff35da16f ] + If algo is NULL set the status to error and return. This change prevent crashing of ipsec-secgw application when a specific cipher/auth/aead algo are not supported by application. Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file") -Cc: stable@dpdk.org Signed-off-by: Savinay Dharmappa Acked-by: Konstantin Ananyev