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 8F1FAA00C5; Thu, 14 Jul 2022 09:55:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F3174282B; Thu, 14 Jul 2022 09:55:31 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 3163041156; Thu, 14 Jul 2022 09:55:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657785329; x=1689321329; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=r4fwY6KtSjB/YjFS8sf1jUziERtq/cN34wjooBrZgB4=; b=UWBn3c7WilmH5uCpdfNhFSeP4IEOKtJXc3K0nCm+0ecXOedSquFsoLuq oU+04cKq5YlC4bVL9X5P2dqhWQdgLMGphOVWDOXmFr6kh+/rDWdu5sDrC hNjIYsWULTLNZyHgX2R5dPlsgYHBHpSrKmy0cI66cMTo+Ky+EtQm8AewZ 9tR8LKL12Yi8tmz32oPQPMbWgiWmOd0LLfMApa3jIw90TAmBhgjAKm2ug cg7tGopNx0GHNkYqt+u6+XqrAdJigcNaVKW/qlrdCE6v7hV3JZOONpKrr jtf+h37N98xxb21mRrvfiU+nJrsjtDon+h0Gm6DlHa6/5OuymETID5+7+ Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10407"; a="268476201" X-IronPort-AV: E=Sophos;i="5.92,269,1650956400"; d="scan'208";a="268476201" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 00:55:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,269,1650956400"; d="scan'208";a="685485236" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by FMSMGA003.fm.intel.com with ESMTP; 14 Jul 2022 00:55:24 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 14 Jul 2022 00:55:24 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 14 Jul 2022 00:55:24 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 14 Jul 2022 00:55:24 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 14 Jul 2022 00:55:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nTxjoSZ58ICh3opPYZ92Lxnpx6nsPf+OOQCgrY7YJOyYyMXjKa+RwD9mrd0mlp4EflvkE8oon1nbTa1qwNWsolJfZzBgtOP9fOv1XsImPgt3U9UbrPKbvDBughCrdRajDNsZQ0Ztqe+4ZU7Y6D7RL3cU/I4UsgatMpcdfVLVltZM/4/1Irsb2PmAD4LyvmMtT/s1UBPpQKi1i8sLG2qFRmV3db21byV/rSUoQioQP189ofZXjoPVMXXEL9CWnWJDrmD8XgobQzys4tUTM6oap5WXnO5yTLT/1bNjD+k8GBx49IDT5svB3YTKFRnf4vMmhzg18QN4yWESI+vssFc7zQ== 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=r4fwY6KtSjB/YjFS8sf1jUziERtq/cN34wjooBrZgB4=; b=kxZ43uR4CUFwoKRt44WvIwn8hJ8IjYyd5mpe9Tl3UvgSpios0v2FU5bwfHmIJ1iaqNSHo9Jx5rCiLcw8eVkH3kFuyWAYvLgXmwT8HK6hQD3lMnkOng5AjU8h8tYZE/dLhUU5lKB40hyYxOFEMHc4CMme7kIErUEA7Xt7WwvfK2Rz3ti7PgD5Ie6oxfyHuDUFeRj0nxr8PR+BRDHcz9m5+b5Rq7qg1ng5eLI9YfAtC8636UcRFD1s1ttYxGyufGjppsjDiuOMKVKX8tkUuMDlQT3ZiNlZYM2ltpN/MabNF3vdgBtoDFrHiSlRMTqxLK/+8b/teydHByUx6/5/rAk9vA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH7PR11MB6006.namprd11.prod.outlook.com (2603:10b6:510:1e1::13) by MWHPR11MB1423.namprd11.prod.outlook.com (2603:10b6:300:22::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20; Thu, 14 Jul 2022 07:55:17 +0000 Received: from PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::8de9:6ac5:c3c4:f200]) by PH7PR11MB6006.namprd11.prod.outlook.com ([fe80::8de9:6ac5:c3c4:f200%4]) with mapi id 15.20.5417.026; Thu, 14 Jul 2022 07:55:17 +0000 From: "Ling, WeiX" To: "Ma, WenwuX" , "maxime.coquelin@redhat.com" , "Xia, Chenbo" , "dev@dpdk.org" CC: "Hu, Jiayu" , "Wang, Yinan" , "He, Xingguang" , "Wang, YuanX" , "stable@dpdk.org" Subject: RE: [PATCH] examples/vhost: fix use after free Thread-Topic: [PATCH] examples/vhost: fix use after free Thread-Index: AQHYl0Dlezb7EF/h+k+RdpVpoPJJyK19f3Lw Date: Thu, 14 Jul 2022 07:55:16 +0000 Message-ID: References: <20220714051106.1134222-1-wenwux.ma@intel.com> In-Reply-To: <20220714051106.1134222-1-wenwux.ma@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 700f83a4-de63-4a37-297b-08da656e3102 x-ms-traffictypediagnostic: MWHPR11MB1423:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: u9RIH1MzPoHCwXPx+FgSXOw4k/r6ipA6N9uwYnUyGiK63z+QLf1XUZ26lZNl9Y4gDYlrdUI9Q97hvGEncA0/KB82K73a0Y6BvioYUIHUbP0aOixBj9yHbit9vOjcfrDjdHPPxIRwwS+xuTSzPHHcD1j80XC80yOKw0c2rAiG/8FmOsal+5fqi1GQmXyVPCenfy0c09yenSaYF1w8QfGF69LOGTaT/c47Fmbs39d3+laDaNjN+GTtvaE4StJ+iI6uHGr3C6uA59QJONZAl02zoJUuvmggZ7r8UvGi1UVEk1wiDmIMqyy9JCC8MvcJ+DyTPjj4etiWXuUYCz2tVmxj72MMzBGGBE/WFMcc6EoIvLdebfoU4+WLXop4xgviM1ksxNhJUAHvuOOp0bBhYhlTDkV4+ludAEr9GwjHiCO0P0hP5fgvcoqmotuLen0LQgmWyrXE4TAlRb0XVGMbJdyuEOMBi+oua+0dmotyLHYwOSHpfJxy1gmI1f5C2TlLDg2n9xGmVfy6BFh+mKQQCvppBw9QK/3LO3I547mnyGJzYc7zWNNU0EuHYgKRW+qjBRFqwl2wUl2lPMo/RLXD3IP3UawOl6NsPjY1BGJQ3oVe7Ukm/QOW8yA0LwBWmtvssP2LkiRh/N3toYi6qXvYvg6r25DysiRfnxDjvwmDnW6OHIFZXzbr5ZV2l5Y9fqM5E0lLueuciK9TAA+ahmuAvEOJ3KVM2c+qBrLktpautT7hVcgQtbhb5BQkz7vxJl58KziZ5twEuRLQbZtu2wf+XN6hPgIdJvyVr9zvKqSaL86YGHpAcMWYoe9ZmWOkhe5mT5c/ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB6006.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(366004)(396003)(346002)(136003)(376002)(83380400001)(71200400001)(110136005)(54906003)(7696005)(6506007)(53546011)(38100700002)(86362001)(66946007)(122000001)(186003)(66556008)(316002)(76116006)(66446008)(66476007)(64756008)(8676002)(33656002)(4326008)(9686003)(26005)(82960400001)(4744005)(38070700005)(2906002)(478600001)(52536014)(55016003)(5660300002)(8936002)(41300700001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZpZJMQL1ljSh+XIt9PYBU79ia1F48OxsUpatL+kpP48PmSqB/ibkfE4BjGac?= =?us-ascii?Q?lXZ7myF76jam7gxiYvri8P+G7mOGBEgZzRl6cWbAzRo6Q9wewkfl11QTE1rH?= =?us-ascii?Q?iG1P4MqXXymR2OqJhsURlWfk5YGqM2+tZet9kpPDmVWFDp/y9afcAClpZhv0?= =?us-ascii?Q?6vm57It1iHqZ35QMC/dDsjVlAznbnID7cTxjy9dwY7zc7t2+Mwa7GMPjSbX0?= =?us-ascii?Q?jsL/qFopFl41eNJja3uQSpce4J2r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lKgY3WpGJZw7RnLmDFHk8kEGvvw2LcWb/rYX8kwvqhXdmM8SjP3J2K?= =?us-ascii?Q?IrCkw7ch+HlyUADm06GBfvilpwV5+quoeyunBdy6F444TADREphFIr1P1Gba?= =?us-ascii?Q?WTJsPDzjNJWejtPgcZ+zaAibI1sY5nwbBnMIcRMuGsGhlp3sqzAFots6kodB?= =?us-ascii?Q?bnCUNIou2J9ub5KP3tNv136aYyvzpdL+6D4Y5UE6TRB3rDhq+DuiIyyMOL0+?= =?us-ascii?Q?nui+u3FCmgOOOVUvGnhOtYOoxgo2TXCUl2FSbE3KczEq6M7YfQzaap3usO7r?= =?us-ascii?Q?eBHjwn0GpwbshNPAK5udoDbRGY3Xa/CNDy8XsjzqnaqZopbFUceCPC3m9FG0?= =?us-ascii?Q?mYS7+VNS+wfsK+Ld2YnTtrf0GvGDMXYnzwwAXYlw8tf4oQsxSt20hquhFBtp?= =?us-ascii?Q?DNb4tb72pCoMU5DJayXAtPcquKZuZLsDzzci9eOL?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6006.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 700f83a4-de63-4a37-297b-08da656e3102 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jul 2022 07:55:16.9224 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: uNPrSo7iVyrmi9z2yL6IvfatYqNcmjPZoPvKLNFMs0ToJKw5hvRIMoDUiXw6tnVYf5FhdPylHFFoTsgIHbujUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1423 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Ma, WenwuX > Sent: Thursday, July 14, 2022 1:11 PM > To: maxime.coquelin@redhat.com; Xia, Chenbo ; > dev@dpdk.org > Cc: Hu, Jiayu ; Wang, Yinan ; > He, Xingguang ; Ling, WeiX > ; Wang, YuanX ; Ma, > WenwuX ; stable@dpdk.org > Subject: [PATCH] examples/vhost: fix use after free >=20 > In async_enqueue_pkts(), the failed pkts will be freed before return, but= , > the failed pkts may be retried later, it will cause use after free. So, w= e free > the failed pkts after retry. >=20 > Fixes: 1907ce4baec3 ("examples/vhost: fix retry logic on Rx path") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wenwu Ma > --- Tested-by: Wei Ling