Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/105122/?format=api
http://patches.dpdk.org/api/patches/105122/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211214033016.29927-1-wangzhihong.wzh@bytedance.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": "<20211214033016.29927-1-wangzhihong.wzh@bytedance.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211214033016.29927-1-wangzhihong.wzh@bytedance.com", "date": "2021-12-14T03:30:16", "name": "ring: fix overflow in memory size calcuation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "986c0d7f635fdae05efd90cb739d8669a394273d", "submitter": { "id": 2312, "url": "http://patches.dpdk.org/api/people/2312/?format=api", "name": "王志宏", "email": "wangzhihong.wzh@bytedance.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/20211214033016.29927-1-wangzhihong.wzh@bytedance.com/mbox/", "series": [ { "id": 20937, "url": "http://patches.dpdk.org/api/series/20937/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20937", "date": "2021-12-14T03:30:16", "name": "ring: fix overflow in memory size calcuation", "version": 1, "mbox": "http://patches.dpdk.org/series/20937/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/105122/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/105122/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 8CED0A034C;\n\tTue, 14 Dec 2021 04:30:24 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C99C040E28;\n\tTue, 14 Dec 2021 04:30:23 +0100 (CET)", "from mail-pj1-f44.google.com (mail-pj1-f44.google.com\n [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 9D8E440395\n for <dev@dpdk.org>; Tue, 14 Dec 2021 04:30:22 +0100 (CET)", "by mail-pj1-f44.google.com with SMTP id\n gx15-20020a17090b124f00b001a695f3734aso15046064pjb.0\n for <dev@dpdk.org>; Mon, 13 Dec 2021 19:30:22 -0800 (PST)", "from C02D70YZMD6R.bytedance.net ([139.177.225.234])\n by smtp.gmail.com with ESMTPSA id l1sm501691pjh.28.2021.12.13.19.30.19\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Mon, 13 Dec 2021 19:30:21 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=bytedance-com.20210112.gappssmtp.com; s=20210112;\n h=from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=JkMkaWItrlWwJh03faN7J8FmFgxH4iCw8zl5yiPvPJ8=;\n b=C+akNtDiun+DFZRdd5XRDWErwGN/HX+4kz23AL4l1MYG6kXQNJd1317XNDtqDkqZrr\n mtUlS/lVEsWcTpoeXiVKVp5GBhtayPBxrQadZZ2hLNSnJODCzqLpk0lOd0TtQEFK1xoL\n RtcG2Aq1FIf+d7NfBESseMcGjoZ4NiOCDfbKtscZx5gTmiWRH0n/gNYZeSss/Dj9ErOk\n WNXuNhYcVM8zcewFK8pV8ME/LiOQhvHMl+qBpKGTT3+m50S/RbZL9pqXkvACpHPfvfsm\n MK+ieU3QvG07g2xnlKbvod8pvW10mCuqv6gvq8i2c+0+eWPfhIQhRfMXQO+FJ5YRnbBa\n txSg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=JkMkaWItrlWwJh03faN7J8FmFgxH4iCw8zl5yiPvPJ8=;\n b=XzFc0GhRhnm8msOZP2NVbpqE85LVq6aAfHIKD/ECXQgMhlbvSIwdSL1hMJn0PV9U/c\n B36ZLts81nZVNB+As20q6WNq51maEcKRODqFsmmvXYp37a7yRsXk9+bHviugNUZ8dUj4\n CYBNdvra3SPNvviXgDmUpWhKQeCo+Rhd95pZI5kc17/UUcTV18NB4BpPfX9hNlCYoD9p\n ZXfcr33RBZceX3NGzbPlb0FDEL2DDaoZisL0BqxRHddOsauDF93gcUyhjCxFYOW+gBzA\n Ji37/LTmw7vplBJAM1oqYcOZD+1RTD0/R75TIBF8QuDCOV9Lmy4TSbHwUjVO2AEIb94W\n Uc+A==", "X-Gm-Message-State": "AOAM531ak/aoZEtiuAi9JZsriRwGdTSA3/ay9omkkoaPIgE46y0fN9hk\n V80yMG19Vks37803UHEvVPCXCg==", "X-Google-Smtp-Source": "\n ABdhPJxTqDIs0JODS9q2poTPPDxds1WDTIDxtQPRDadfSyrJHpKDVtsLnT5QPZif2+f1r+TYQ84zZg==", "X-Received": "by 2002:a17:902:c7c2:b0:143:bdf7:1670 with SMTP id\n r2-20020a170902c7c200b00143bdf71670mr3200738pla.61.1639452621680;\n Mon, 13 Dec 2021 19:30:21 -0800 (PST)", "From": "Zhihong Wang <wangzhihong.wzh@bytedance.com>", "To": "konstantin.ananyev@intel.com, honnappa.nagarahalli@arm.com, dev@dpdk.org", "Cc": "Zhihong Wang <wangzhihong.wzh@bytedance.com>,\n\tstable@dpdk.org", "Subject": "[PATCH] ring: fix overflow in memory size calcuation", "Date": "Tue, 14 Dec 2021 11:30:16 +0800", "Message-Id": "<20211214033016.29927-1-wangzhihong.wzh@bytedance.com>", "X-Mailer": "git-send-email 2.24.3 (Apple Git-128)", "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": "Parameters count and esize are both unsigned int, and their product can\nlegally exceed unsigned int and lead to runtime access violation.\n\nFixes: cc4b218790f6 (\"ring: support configurable element size\")\nCc: stable@dpdk.org\n\nSigned-off-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>\n---\n lib/ring/rte_ring.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c\nindex f17bd966be..d1b80597af 100644\n--- a/lib/ring/rte_ring.c\n+++ b/lib/ring/rte_ring.c\n@@ -75,7 +75,7 @@ rte_ring_get_memsize_elem(unsigned int esize, unsigned int count)\n \t\treturn -EINVAL;\n \t}\n \n-\tsz = sizeof(struct rte_ring) + count * esize;\n+\tsz = sizeof(struct rte_ring) + (ssize_t)count * esize;\n \tsz = RTE_ALIGN(sz, RTE_CACHE_LINE_SIZE);\n \treturn sz;\n }\n", "prefixes": [] }{ "id": 105122, "url": "