Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/49975/?format=api
http://patchwork.dpdk.org/api/patches/49975/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190121081218.16343-1-tiwei.bie@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20190121081218.16343-1-tiwei.bie@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190121081218.16343-1-tiwei.bie@intel.com", "date": "2019-01-21T08:12:18", "name": "vhost: fix possible out of bound access for indirect descs", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "c7c86dda50005ec399a0e3fd3cdc10b709929bbb", "submitter": { "id": 617, "url": "http://patchwork.dpdk.org/api/people/617/?format=api", "name": "Tiwei Bie", "email": "tiwei.bie@intel.com" }, "delegate": { "id": 2642, "url": "http://patchwork.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190121081218.16343-1-tiwei.bie@intel.com/mbox/", "series": [ { "id": 3276, "url": "http://patchwork.dpdk.org/api/series/3276/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=3276", "date": "2019-01-21T08:12:18", "name": "vhost: fix possible out of bound access for indirect descs", "version": 1, "mbox": "http://patchwork.dpdk.org/series/3276/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/49975/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/49975/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 C94DD4CC5;\n\tMon, 21 Jan 2019 09:15:30 +0100 (CET)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id C3E193977;\n\tMon, 21 Jan 2019 09:15:28 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t21 Jan 2019 00:15:27 -0800", "from unknown (HELO dpdk-tbie.sh.intel.com) ([10.67.104.173])\n\tby orsmga002.jf.intel.com with ESMTP; 21 Jan 2019 00:15:23 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,502,1539673200\"; d=\"scan'208\";a=\"127608605\"", "From": "Tiwei Bie <tiwei.bie@intel.com>", "To": "maxime.coquelin@redhat.com,\n\tzhihong.wang@intel.com,\n\tdev@dpdk.org", "Cc": "haiyue.wang@intel.com,\n\tstable@dpdk.org", "Date": "Mon, 21 Jan 2019 16:12:18 +0800", "Message-Id": "<20190121081218.16343-1-tiwei.bie@intel.com>", "X-Mailer": "git-send-email 2.17.1", "Subject": "[dpdk-dev] [PATCH] vhost: fix possible out of bound access for\n\tindirect descs", "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": "Fix a possible out of bound access which may happen when handling\nindirect descs in split ring.\n\nFixes: 1be4ebb1c464 (\"vhost: support indirect descriptor in mergeable Rx\")\nCc: stable@dpdk.org\n\nReported-by: Haiyue Wang <haiyue.wang@intel.com>\nSigned-off-by: Tiwei Bie <tiwei.bie@intel.com>\n---\n lib/librte_vhost/virtio_net.c | 8 ++------\n 1 file changed, 2 insertions(+), 6 deletions(-)", "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 0893a1d04..37a4c00d2 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -310,6 +310,7 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tuint32_t len = 0;\n \tuint64_t dlen;\n \tuint32_t nr_descs = vq->size;\n+\tuint32_t cnt = 0;\n \tstruct vring_desc *descs = vq->desc;\n \tstruct vring_desc *idesc = NULL;\n \n@@ -348,12 +349,7 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t}\n \n \twhile (1) {\n-\t\tif (unlikely(idx >= vq->size)) {\n-\t\t\tfree_ind_table(idesc);\n-\t\t\treturn -1;\n-\t\t}\n-\n-\t\tif (unlikely(nr_descs-- == 0)) {\n+\t\tif (unlikely(idx >= nr_descs || cnt++ >= nr_descs)) {\n \t\t\tfree_ind_table(idesc);\n \t\t\treturn -1;\n \t\t}\n", "prefixes": [] }{ "id": 49975, "url": "