Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/90041/?format=api
http://patches.dpdk.org/api/patches/90041/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210330140702.49202-1-wenwux.ma@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20210330140702.49202-1-wenwux.ma@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210330140702.49202-1-wenwux.ma@intel.com", "date": "2021-03-30T14:07:02", "name": "mbuf: Fix illegal pointer access to mempool members", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e9a31b4cfb655c3a1a149aac6e3a90ea43c61389", "submitter": { "id": 2163, "url": "http://patches.dpdk.org/api/people/2163/?format=api", "name": "Ma, WenwuX", "email": "wenwux.ma@intel.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210330140702.49202-1-wenwux.ma@intel.com/mbox/", "series": [ { "id": 15954, "url": "http://patches.dpdk.org/api/series/15954/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=15954", "date": "2021-03-30T14:07:02", "name": "mbuf: Fix illegal pointer access to mempool members", "version": 1, "mbox": "http://patches.dpdk.org/series/15954/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/90041/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/90041/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 863C4A034F;\n\tTue, 30 Mar 2021 04:13:23 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6C1B3140F25;\n\tTue, 30 Mar 2021 04:13:23 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 68FEF406B4\n for <dev@dpdk.org>; Tue, 30 Mar 2021 04:13:22 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Mar 2021 19:13:21 -0700", "from unknown (HELO localhost.localdomain) ([10.240.183.109])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Mar 2021 19:13:18 -0700" ], "IronPort-SDR": [ "\n scgwQJF1Gz0g6w45ycG63rGMM9TxRx/9VWicNCYa1prawcfSWNVwgBnSu/+2j1hUybJX7vVZlo\n lUBpMglXFKew==", "\n DVj1X64SXOZ14w8/DBMDVmYASnSqxKYNOE+ssgICz+HvzN70Sb+BwxdkSx5lZ/WhTrs95u61wq\n FDKopl106G8A==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9938\"; a=\"191765864\"", "E=Sophos;i=\"5.81,289,1610438400\"; d=\"scan'208\";a=\"191765864\"", "E=Sophos;i=\"5.81,289,1610438400\"; d=\"scan'208\";a=\"417943362\"" ], "From": "wenwux.ma@intel.com", "To": "olivier.matz@6wind.com", "Cc": "dev@dpdk.org,\n\twenwu ma <wenwux.ma@intel.com>", "Date": "Tue, 30 Mar 2021 14:07:02 +0000", "Message-Id": "<20210330140702.49202-1-wenwux.ma@intel.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] mbuf: Fix illegal pointer access to mempool\n members", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: wenwu ma <wenwux.ma@intel.com>\n\nBefore accessing the private data of mempool in\nfunction rte_pktmbuf_priv_size() and rte_pktmbuf_data_room_size(),\nit is necessary to determine whether the private data exists,\notherwise it will cause null pointer access.\n\nSigned-off-by: wenwu ma <wenwux.ma@intel.com>\n---\n lib/librte_mbuf/rte_mbuf.h | 6 ++++++\n 1 file changed, 6 insertions(+)", "diff": "diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex c4c9ebfaa..9cca9a7d4 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -811,6 +811,9 @@ rte_pktmbuf_data_room_size(struct rte_mempool *mp)\n {\n \tstruct rte_pktmbuf_pool_private *mbp_priv;\n \n+\tif (mp->private_data_size != sizeof(struct rte_pktmbuf_pool_private))\n+\t\treturn 0;\n+\n \tmbp_priv = (struct rte_pktmbuf_pool_private *)rte_mempool_get_priv(mp);\n \treturn mbp_priv->mbuf_data_room_size;\n }\n@@ -832,6 +835,9 @@ rte_pktmbuf_priv_size(struct rte_mempool *mp)\n {\n \tstruct rte_pktmbuf_pool_private *mbp_priv;\n \n+\tif (mp->private_data_size != sizeof(struct rte_pktmbuf_pool_private))\n+\t\treturn 0;\n+\n \tmbp_priv = (struct rte_pktmbuf_pool_private *)rte_mempool_get_priv(mp);\n \treturn mbp_priv->mbuf_priv_size;\n }\n", "prefixes": [] }{ "id": 90041, "url": "