Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/52857/?format=api
https://patches.dpdk.org/api/patches/52857/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1555493621-353-1-git-send-email-radu.nicolau@intel.com/", "project": { "id": 1, "url": "https://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": "<1555493621-353-1-git-send-email-radu.nicolau@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1555493621-353-1-git-send-email-radu.nicolau@intel.com", "date": "2019-04-17T09:33:41", "name": "[v2] net/bonding: fix potential out of bounds read", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a933a3a251d7ae99cf382e80760dfe66f8ef5358", "submitter": { "id": 743, "url": "https://patches.dpdk.org/api/people/743/?format=api", "name": "Radu Nicolau", "email": "radu.nicolau@intel.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1555493621-353-1-git-send-email-radu.nicolau@intel.com/mbox/", "series": [ { "id": 4347, "url": "https://patches.dpdk.org/api/series/4347/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4347", "date": "2019-04-17T09:33:41", "name": "[v2] net/bonding: fix potential out of bounds read", "version": 2, "mbox": "https://patches.dpdk.org/series/4347/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/52857/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/52857/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C6CA01B5F2;\n\tWed, 17 Apr 2019 11:39:43 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id C57D31B5EA;\n\tWed, 17 Apr 2019 11:39:41 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Apr 2019 02:39:41 -0700", "from silpixa00383879.ir.intel.com (HELO\n\tsilpixa00383879.ger.corp.intel.com) ([10.237.222.142])\n\tby FMSMGA003.fm.intel.com with ESMTP; 17 Apr 2019 02:39:38 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.60,361,1549958400\"; d=\"scan'208\";a=\"150118785\"", "From": "Radu Nicolau <radu.nicolau@intel.com>", "To": "dev@dpdk.org", "Cc": "declan.doherty@intel.com, chas3@att.com, ferruh.yigit@intel.com,\n\tRadu Nicolau <radu.nicolau@intel.com>, stable@dpdk.org", "Date": "Wed, 17 Apr 2019 10:33:41 +0100", "Message-Id": "<1555493621-353-1-git-send-email-radu.nicolau@intel.com>", "X-Mailer": "git-send-email 2.7.5", "In-Reply-To": "<1555320458-9432-1-git-send-email-radu.nicolau@intel.com>", "References": "<1555320458-9432-1-git-send-email-radu.nicolau@intel.com>", "Subject": "[dpdk-dev] [PATCH v2] net/bonding: fix potential out of bounds read", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add validation to pointer constructed from the IPv4 header length\nin order to prevent malformed packets from generating a potential\nout of bounds memory read.\n\nFixes: 09150784a776 (\"net/bonding: burst mode hash calculation\")\nCc: stable@dpdk.org\n\nSigned-off-by: Radu Nicolau <radu.nicolau@intel.com>\n---\nv2: add fixes lines\n\n drivers/net/bonding/rte_eth_bond_pmd.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c\nindex b0d191d..25dbddc 100644\n--- a/drivers/net/bonding/rte_eth_bond_pmd.c\n+++ b/drivers/net/bonding/rte_eth_bond_pmd.c\n@@ -842,6 +842,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,\n \n \tfor (i = 0; i < nb_pkts; i++) {\n \t\teth_hdr = rte_pktmbuf_mtod(buf[i], struct ether_hdr *);\n+\t\tsize_t pkt_end = (size_t)eth_hdr + rte_pktmbuf_pkt_len(buf[i]);\n \t\tproto = eth_hdr->ether_type;\n \t\tvlan_offset = get_vlan_offset(eth_hdr, &proto);\n \t\tl3hash = 0;\n@@ -865,13 +866,17 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,\n \t\t\t\t\ttcp_hdr = (struct tcp_hdr *)\n \t\t\t\t\t\t((char *)ipv4_hdr +\n \t\t\t\t\t\t\tip_hdr_offset);\n-\t\t\t\t\tl4hash = HASH_L4_PORTS(tcp_hdr);\n+\t\t\t\t\tif ((size_t)tcp_hdr + sizeof(*tcp_hdr)\n+\t\t\t\t\t\t\t< pkt_end)\n+\t\t\t\t\t\tl4hash = HASH_L4_PORTS(tcp_hdr);\n \t\t\t\t} else if (ipv4_hdr->next_proto_id ==\n \t\t\t\t\t\t\t\tIPPROTO_UDP) {\n \t\t\t\t\tudp_hdr = (struct udp_hdr *)\n \t\t\t\t\t\t((char *)ipv4_hdr +\n \t\t\t\t\t\t\tip_hdr_offset);\n-\t\t\t\t\tl4hash = HASH_L4_PORTS(udp_hdr);\n+\t\t\t\t\tif ((size_t)udp_hdr + sizeof(*udp_hdr)\n+\t\t\t\t\t\t\t< pkt_end)\n+\t\t\t\t\t\tl4hash = HASH_L4_PORTS(udp_hdr);\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (rte_cpu_to_be_16(ETHER_TYPE_IPv6) == proto) {\n", "prefixes": [ "v2" ] }{ "id": 52857, "url": "