Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/113835/?format=api
https://patches.dpdk.org/api/patches/113835/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220708134923.136101-1-roy.fan.zhang@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": "<20220708134923.136101-1-roy.fan.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220708134923.136101-1-roy.fan.zhang@intel.com", "date": "2022-07-08T13:49:23", "name": "vhost/crypto: fix out of bound access", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "0117178fa6f0717211d0f789809d789444145611", "submitter": { "id": 304, "url": "https://patches.dpdk.org/api/people/304/?format=api", "name": "Fan Zhang", "email": "roy.fan.zhang@intel.com" }, "delegate": { "id": 2642, "url": "https://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220708134923.136101-1-roy.fan.zhang@intel.com/mbox/", "series": [ { "id": 23945, "url": "https://patches.dpdk.org/api/series/23945/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=23945", "date": "2022-07-08T13:49:23", "name": "vhost/crypto: fix out of bound access", "version": 1, "mbox": "https://patches.dpdk.org/series/23945/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/113835/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/113835/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 D115FA00C5;\n\tFri, 8 Jul 2022 15:49:29 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C247B406B4;\n\tFri, 8 Jul 2022 15:49:29 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 754D94021E\n for <dev@dpdk.org>; Fri, 8 Jul 2022 15:49:28 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 08 Jul 2022 06:49:27 -0700", "from silpixa00400885.ir.intel.com ([10.243.22.168])\n by orsmga008.jf.intel.com with ESMTP; 08 Jul 2022 06:49:25 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1657288168; x=1688824168;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=bW432mgm2O4kk9mrctn5odNbcDlCFDsytXByDX/xD3I=;\n b=clVBZtj2fBNg3SDyojWcc6v+aLYGD5CM1+PLtE/85TvljqBo/C8a5oLD\n F0ikK5jnvxfLyA9LLl7YnOaPwGPxU4NQNSv3Of2nt/yFNBKmVCw/Fcnlm\n 7KjryLs7rJYD3ze7nBQpLUXVEAqjCkgmvEoAFHk0zFyNoB1iKFdIOYF0G\n IAMLdFHAd6jdoewxjsaboXIKtdilZ+jNWsgEFPi0gCPd14ua7AnV9M1kp\n Vn1hndFE0C/CDoyqFkC6jK51qUUQOqSt8Tosltg9oTM3UbELqVcUWvTsz\n xqVxDwY1D2OZjyJRdAU8ALCeZK1exfi4gRS6U/TQxJnRCx3Ym7V0/Gv1L A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10401\"; a=\"281832239\"", "E=Sophos;i=\"5.92,255,1650956400\"; d=\"scan'208\";a=\"281832239\"", "E=Sophos;i=\"5.92,255,1650956400\"; d=\"scan'208\";a=\"621222002\"" ], "X-ExtLoop1": "1", "From": "Fan Zhang <roy.fan.zhang@intel.com>", "To": "dev@dpdk.org", "Cc": "maxime.coquelin@redhat.com, Fan Zhang <roy.fan.zhang@intel.com>,\n david.marchand@redhat.com", "Subject": "[PATCH] vhost/crypto: fix out of bound access", "Date": "Fri, 8 Jul 2022 13:49:23 +0000", "Message-Id": "<20220708134923.136101-1-roy.fan.zhang@intel.com>", "X-Mailer": "git-send-email 2.34.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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" }, "content": "Coverity issue: 379211\n\nFixes: 4414bb67010d (\"vhost/crypto: fix build with GCC 12\")\nCc: david.marchand@redhat.com\n\nSigned-off-by: Fan Zhang <roy.fan.zhang@intel.com>\n---\n lib/vhost/vhost_crypto.c | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)", "diff": "diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c\nindex 54946f46d9..e9c3322d20 100644\n--- a/lib/vhost/vhost_crypto.c\n+++ b/lib/vhost/vhost_crypto.c\n@@ -574,12 +574,11 @@ copy_data_from_desc(void *dst, struct vhost_crypto_data_req *vc_req,\n \n \tremain = RTE_MIN(desc->len, size);\n \taddr = desc->addr;\n-\tdo {\n-\t\tuint64_t len;\n-\t\tvoid *src;\n \n-\t\tlen = remain;\n-\t\tsrc = IOVA_TO_VVA(void *, vc_req, addr, &len, VHOST_ACCESS_RO);\n+ while (remain) {\n+ uint64_t len = remain;\n+\t\tvoid *src = IOVA_TO_VVA(void *, vc_req, addr, &len, VHOST_ACCESS_RO);\n+\n \t\tif (unlikely(src == NULL || len == 0))\n \t\t\treturn 0;\n \n@@ -588,7 +587,7 @@ copy_data_from_desc(void *dst, struct vhost_crypto_data_req *vc_req,\n \t\t/* cast is needed for 32-bit architecture */\n \t\tdst = RTE_PTR_ADD(dst, (size_t)len);\n \t\taddr += len;\n-\t} while (unlikely(remain != 0));\n+ }\n \n \treturn RTE_MIN(desc->len, size);\n }\n", "prefixes": [] }{ "id": 113835, "url": "