From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 008C0430FF for ; Fri, 25 Aug 2023 13:22:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED14442BC9; Fri, 25 Aug 2023 13:22:59 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2075.outbound.protection.outlook.com [40.107.7.75]) by mails.dpdk.org (Postfix) with ESMTP id 0CA16400D5; Fri, 25 Aug 2023 13:22:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cyo37bvHcbL0qqnaSyzYg55T4Cu50AKELf9JYG3Mi47Ckp2hoFlb85+EC6aszKAvCmkO6eSv5cAbA1dbZWh26bQB/NvTsD0MhqzC7OwnVneFmdVcl9FP6m/Wxsn37q0X6MGQjbM93m/NqYDhbowxcfGrDfON2Lb40qj5/YdCgIJID8PMZCsNkxrjnz4anxrv7alJlzJkPag/K2L1GY4utmp3mHsopXEx7eUqMub7MRuFdWPdoundZE/5QpI++aF8s7ZulG3pSm/8lnySZwuB7DX2nhbPrmV1OYvwyJoE9QYK7ShQDXIRUn/I5T4zXwclbKLFE3GpxqrY4uvBFCSuGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y3L48uaxYk3cXwFQF7cBbonewBh3y+jF+f1O7jZa3fA=; b=DzoLZ4c5ppL5kjYYlXImsnDxz4OV/ZcDdfqBAeyEHuVTlm6a9GF20EIyv4payh2BsKUbGd8BiYG3JSLLqnEKNqFLkIMMO8vXzyVzZ1dz8d6+CvQsvvTkcgfizBLjrWv352q0+hTf+bqR5bhtCXsa76DcRFhUZIuDGXwxTm0l1oPcTHsBI+TpP/jIG2VCWzI0fetBy4gAbVQ4OP/Nc1L/Ag8EZbEM+7uy6VBfsC3YD8HSWR0++W1cNmuSjoQinYRDPKggUMgbzh05aJOnGpGNnuf+VR6Goiymij7Bk6suDEA994kfZSIfZbjIYOTNybMvjlq6B6CWBc/Be+GUDnG0sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y3L48uaxYk3cXwFQF7cBbonewBh3y+jF+f1O7jZa3fA=; b=JqFhKgiO2p8gnU8J1+5fwfHJk+lQ5hmhjbQU4XdyCjaxSh577gEAdH8msu1MUvtw+298tBPEC4dIzCypNL6yxcNgyzyU3yPh9snMG+eJiUmGXMcAiTlcB44eyirtMR1kXhiFy0MeCteDgstMDbt/NB6+Dw91+NPkx7Dp1hkYVOM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by DB9PR04MB9452.eurprd04.prod.outlook.com (2603:10a6:10:367::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.29; Fri, 25 Aug 2023 11:22:54 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::450d:89ac:4f6a:6ae2]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::450d:89ac:4f6a:6ae2%4]) with mapi id 15.20.6699.028; Fri, 25 Aug 2023 11:22:54 +0000 Message-ID: <94858d65-2088-6108-6aa3-d1db94e92b84@oss.nxp.com> Date: Fri, 25 Aug 2023 16:52:46 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] test/security: fix buffer leaks in error path Content-Language: en-US To: Akhil Goyal , dev@dpdk.org Cc: vattunuru@marvell.com, stable@dpdk.org References: <20230822173316.465078-1-gakhil@marvell.com> From: Hemant Agrawal In-Reply-To: <20230822173316.465078-1-gakhil@marvell.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SI2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:195::6) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|DB9PR04MB9452:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b465a2e-faec-4d0e-c24a-08dba55da05f X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZQ0lVtdn8DhAMhnO0B5jORcHHUkfspQlFYchyJ1CJe+0lIouVvN9qlRjhFJbFW9twYDa10CWeYrBU9ZiGC4z7x1hnTC/GfNFX7YyhuPm2aPhzZ0jj81wIpItN7QY3h1rL804xupaXen7+5fSp50jmiIam1YB4nCbYbnJoP7DBiqHrngWS5zeHgxMR8rqDyfN0ZZxF3Pj6GQ4BBlNunDAAKyuNk37GzMNv92wAe7FrRVM8ohHxpgSCopvgDWck1EUwr3Jl5fTJ1HviLv8o9X6npAlO8QPEUik4aSbrOQhnpCYm4AfAzqHeCBeiYXZtAPuV0NiNlFPEv2RKfosAjGNDMT+blFCuHgzl2ktKpHHpa4AvIHbIj8tdsP4wRedK+5u+64pTPTJc2lLwHnaBvGiBMO8vm4RQiassUXkxwzbMWHJ4E00KuB/QiOF3XDnReLx7jef/1DkotUB+BmqdZgkQOFp+39rFOR81NCbguGuirHIFoozJBgLEsaSPVLwiWfCmM47GNBgJzHJJup+puApiYLSTzy90XtjFCfqM32BYuOH4rNz+ORgu3PLnBGE8t8gqjlrFEg5tILxnsXl3p6iopoa/k5m7LoT3zDcKqmdZLDQnDH7UIbwScCzt7PpkB/SpIzGwXcF9IkOYs2O0ww3Dg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(376002)(396003)(346002)(366004)(451199024)(1800799009)(186009)(38100700002)(8676002)(4326008)(8936002)(31696002)(41300700001)(6486002)(6506007)(53546011)(6666004)(316002)(66476007)(66556008)(66946007)(86362001)(6512007)(26005)(478600001)(44832011)(83380400001)(15650500001)(31686004)(2906002)(2616005)(5660300002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TGV4azJpeUJVM0p3VTlUaStXTi9GWjY4c0tFdXR3aUp5aGZGYzMxRmVDOFhC?= =?utf-8?B?UkJkdXRGTjMyTllmUmxLdEkybFphRGh2MEJVWFdrK2RUYTRIN3VLRkcyWU5H?= =?utf-8?B?bDN1UnllTDZUODVNYmN3RWFnZFpnM0RQbkNCOVdTeVVQRmlyMng2SXNobUU2?= =?utf-8?B?N1ZYbTdQQkRGOVNjWDk2L1JlbkxtSlBQZVlUNDdrRjlhTUxoSnRiRnRtTUNG?= =?utf-8?B?Zy9NSDlaWm1qYWQxOENhbVhxUS9tVzlSaVNyNURiODFEUWVpZGdBbFphZStI?= =?utf-8?B?dUN4d3p1UjJQcTRJRU85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NzFUUDF0NDJaRWhib2dwNUZ1?= =?utf-8?B?T0N6QXFaVUxPcmp4bkoxRk8wSUdOSmYvdGNnNW16Z0Z1YUo0MGhBelI0cmlt?= =?utf-8?B?NlE9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b465a2e-faec-4d0e-c24a-08dba55da05f X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2023 11:22:54.8092 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wla8Zw7OrJlNhP1ZJmDIk1sLtmjSrn5fa4QWrkyd2ECawTBxmRqkOnR78WCdCY0WdlttbAohsDfGRNpVc0nzxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9452 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: hemant.agrawal@nxp.com Errors-To: stable-bounces@dpdk.org On 22-Aug-23 11:03 PM, Akhil Goyal wrote: > In case of failure of a test in macsec autotest, > the buffers were not getting cleaned. > Added appropriate code to clean the buffers. > > Fixes: 993ea577a006 ("test/security: add inline MACsec cases") > Cc: stable@dpdk.org > > Signed-off-by: Akhil Goyal > --- > app/test/test_security_inline_macsec.c | 70 ++++++++++++++++++-------- > 1 file changed, 49 insertions(+), 21 deletions(-) > > diff --git a/app/test/test_security_inline_macsec.c b/app/test/test_security_inline_macsec.c > index 20670fe5d2..8b57bc51fb 100644 > --- a/app/test/test_security_inline_macsec.c > +++ b/app/test/test_security_inline_macsec.c > @@ -837,6 +837,11 @@ test_macsec_event_callback(uint16_t port_id, enum rte_eth_event_type type, > return 0; > } > > +#define FREE_PKTS(j, m) { \ > + while (j--) \ > + rte_pktmbuf_free(m[j]); \ > +} > + Changes looks good. However do you want to define a static inline function here instead of macro? > static int > test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs_test_opts *opts) > { > @@ -878,8 +883,7 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > tx_pkts_burst[j]->ol_flags |= RTE_MBUF_F_TX_MACSEC; > } > if (tx_pkts_burst[j] == NULL) { > - while (j--) > - rte_pktmbuf_free(tx_pkts_burst[j]); > + FREE_PKTS(j, tx_pkts_burst); > ret = TEST_FAILED; > goto out; > } > @@ -891,8 +895,7 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > opts->ar_td[k]->secure_pkt.data, > opts->ar_td[k]->secure_pkt.len); > if (tx_pkts_burst[j] == NULL) { > - while (j--) > - rte_pktmbuf_free(tx_pkts_burst[j]); > + FREE_PKTS(j, tx_pkts_burst); > ret = TEST_FAILED; > goto out; > } > @@ -919,8 +922,7 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > tx_pkts_burst[j]->ol_flags |= RTE_MBUF_F_TX_MACSEC; > } > if (tx_pkts_burst[j] == NULL) { > - while (j--) > - rte_pktmbuf_free(tx_pkts_burst[j]); > + FREE_PKTS(j, tx_pkts_burst); > ret = TEST_FAILED; > goto out; > } > @@ -942,7 +944,9 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > id = rte_security_macsec_sa_create(ctx, &sa_conf); > if (id < 0) { > printf("MACsec SA create failed : %d.\n", id); > - return TEST_FAILED; > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > + goto out; > } > rx_sa_id[i][an] = (uint16_t)id; > } > @@ -951,6 +955,8 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > id = rte_security_macsec_sc_create(ctx, &sc_conf); > if (id < 0) { > printf("MACsec SC create failed : %d.\n", id); > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > goto out; > } > rx_sc_id[i] = (uint16_t)id; > @@ -958,19 +964,26 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > /* Create Inline IPsec session. */ > ret = fill_session_conf(td[i], port_id, opts, &sess_conf, > RTE_SECURITY_MACSEC_DIR_RX, rx_sc_id[i], tci_off); > - if (ret) > - return TEST_FAILED; > - > + if (ret) { > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > + goto out; > + } > rx_sess[i] = rte_security_session_create(ctx, &sess_conf, > sess_pool); > if (rx_sess[i] == NULL) { > printf("SEC Session init failed.\n"); > - return TEST_FAILED; > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > + goto out; > } > ret = create_default_flow(td[i], port_id, > RTE_SECURITY_MACSEC_DIR_RX, rx_sess[i]); > - if (ret) > + if (ret) { > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > goto out; > + } > } > if (op == MCS_ENCAP || op == MCS_ENCAP_DECAP || > op == MCS_AUTH_ONLY || op == MCS_AUTH_VERIFY) { > @@ -983,7 +996,9 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > id = rte_security_macsec_sa_create(ctx, &sa_conf); > if (id < 0) { > printf("MACsec SA create failed : %d.\n", id); > - return TEST_FAILED; > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > + goto out; > } > tx_sa_id[i][0] = (uint16_t)id; > tx_sa_id[i][1] = MCS_INVALID_SA; > @@ -997,6 +1012,8 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > id = rte_security_macsec_sa_create(ctx, &sa_conf); > if (id < 0) { > printf("MACsec rekey SA create failed : %d.\n", id); > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > goto out; > } > tx_sa_id[i][1] = (uint16_t)id; > @@ -1006,6 +1023,8 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > id = rte_security_macsec_sc_create(ctx, &sc_conf); > if (id < 0) { > printf("MACsec SC create failed : %d.\n", id); > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > goto out; > } > tx_sc_id[i] = (uint16_t)id; > @@ -1013,19 +1032,26 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > /* Create Inline IPsec session. */ > ret = fill_session_conf(td[i], port_id, opts, &sess_conf, > RTE_SECURITY_MACSEC_DIR_TX, tx_sc_id[i], tci_off); > - if (ret) > - return TEST_FAILED; > - > + if (ret) { > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > + goto out; > + } > tx_sess[i] = rte_security_session_create(ctx, &sess_conf, > sess_pool); > if (tx_sess[i] == NULL) { > printf("SEC Session init failed.\n"); > - return TEST_FAILED; > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > + goto out; > } > ret = create_default_flow(td[i], port_id, > RTE_SECURITY_MACSEC_DIR_TX, tx_sess[i]); > - if (ret) > + if (ret) { > + FREE_PKTS(j, tx_pkts_burst); > + ret = TEST_FAILED; > goto out; > + } > } > } > > @@ -1042,6 +1068,7 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > > rte_pause(); > > + j = 0; > /* Receive back packet on loopback interface. */ > do { > nb_rx += rte_eth_rx_burst(port_id, 0, > @@ -1055,8 +1082,7 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > if (nb_rx != nb_sent) { > printf("\nUnable to RX all %d packets, received(%i)", > nb_sent, nb_rx); > - while (--nb_rx >= 0) > - rte_pktmbuf_free(rx_pkts_burst[nb_rx]); > + FREE_PKTS(nb_rx, rx_pkts_burst); > ret = TEST_FAILED; > if (opts->check_sectag_interrupts == 1) > ret = TEST_SUCCESS; > @@ -1080,7 +1106,9 @@ test_macsec(const struct mcs_test_vector *td[], enum mcs_op op, const struct mcs > id = rte_security_macsec_sa_create(ctx, &sa_conf); > if (id < 0) { > printf("MACsec SA create failed : %d.\n", id); > - return TEST_FAILED; > + FREE_PKTS(nb_rx, rx_pkts_burst); > + ret = TEST_FAILED; > + goto out; > } > tx_sa_id[0][0] = (uint16_t)id; > break;