Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/53572/?format=api
http://patches.dpdk.org/api/patches/53572/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190521144713.12046-1-stephen@networkplumber.org/", "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": "<20190521144713.12046-1-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20190521144713.12046-1-stephen@networkplumber.org", "date": "2019-05-21T14:47:13", "name": "compress/isal: fix use after free", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1d34d07237b06f445c3561e9c9081e660f3144eb", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": { "id": 6690, "url": "http://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190521144713.12046-1-stephen@networkplumber.org/mbox/", "series": [ { "id": 4731, "url": "http://patches.dpdk.org/api/series/4731/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4731", "date": "2019-05-21T14:47:13", "name": "compress/isal: fix use after free", "version": 1, "mbox": "http://patches.dpdk.org/series/4731/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/53572/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/53572/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 EB7785592;\n\tTue, 21 May 2019 16:47:16 +0200 (CEST)", "from mail-pf1-f195.google.com (mail-pf1-f195.google.com\n\t[209.85.210.195]) by dpdk.org (Postfix) with ESMTP id F0E674F91\n\tfor <dev@dpdk.org>; Tue, 21 May 2019 16:47:15 +0200 (CEST)", "by mail-pf1-f195.google.com with SMTP id u17so9195946pfn.7\n\tfor <dev@dpdk.org>; Tue, 21 May 2019 07:47:15 -0700 (PDT)", "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\tt2sm17749176pfh.166.2019.05.21.07.47.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 21 May 2019 07:47:14 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=8330PcApY6ka1Sn7moWEczC9dE9Y7TQKC1zU7koWEhw=;\n\tb=KggU5gwykXb270Zaw9jF2kExJA3xr81mlgzO9Xsh8yTguUZrMpgiXiWYzPWMLKUWaM\n\tSWOzwMYByiFRXYK+pAz8ZOQPaglKjT923brmOFmDPVskQIe0S96nSo5RLK57zY1h0NXk\n\tRRwJchzMfqD4/hE/CeIGuk9i6rkzhVJbxvjeJO7dvHbFCslEgxL+vZGkXWLCETEjLVMf\n\tHFCKXQNLkfrzNFMnm7jYHr7QCcjDeQ0eeDkl7t4ui5I1RNTLvA6EW6P98TUZ72h5fzNs\n\tTvbZY5rmJBpRY8pvcnYETMabgaWGuRWBlcXLwwjBnzU1nOzQnTy+30RtLwJs0/ag058g\n\t476w==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=8330PcApY6ka1Sn7moWEczC9dE9Y7TQKC1zU7koWEhw=;\n\tb=NrEBU+rpFElLeUKaOC8l0i/BSJwOiQgjabFaw1CkBLzkp45+Z7/PxZuBWwJnImHeNi\n\tQICHhec7/FcdZ805UcxoJCxy8NBtmFiW9J+zmutWxPX88WQVU9ysTBjD/8H7gpkNFNVG\n\tQeHw5Iv+WYA5E6Hjbpl0N6Ao5G/jkn5y6wMDefCPSYltuydx1Ndfhh/1IqelYaL7nalh\n\tYh6iziA3vNduM+k4PvS+cs0jOF7kBpshD9jUl1nZMALR59sevetHGZsRYGXfKggxj62Y\n\t0cGO+nAYoBzrv8I8yJBdEjOyLVW36sQX80peh0jD+npgD7ZH4bvnDnOSKR8RG9Qtn+YY\n\tjVkg==", "X-Gm-Message-State": "APjAAAXoO6KKCa0T9UWtplcp6YnuTTVF4ZmoGKLkACJLXggRUh/YdJUW\n\tXkP5UZ6fo2N1ogEYDk/RZ3+xKw==", "X-Google-Smtp-Source": "APXvYqxRa4jwJ6rJtv4Mm5eamw6Ja6nwdAGVa6Gcg3GvUejSo/A3jMrF4YqxUATsk8scobLJQbaXlw==", "X-Received": "by 2002:a63:730f:: with SMTP id\n\to15mr82689634pgc.315.1558450035141; \n\tTue, 21 May 2019 07:47:15 -0700 (PDT)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "lee.daly@intel.com", "Cc": "dev@dpdk.org,\n\tStephen Hemminger <stephen@networkplumber.org>", "Date": "Tue, 21 May 2019 07:47:13 -0700", "Message-Id": "<20190521144713.12046-1-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] compress/isal: fix use after free", "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": "The release function was using qp->stream after already\nreleasing it and the null pointer checking was missing.\n\nAlso since rte_free(NULL) is a no-op, remove unnecessary\nchecks for NULL.\n\nCoverity issure: 340860\nFixes: dc49e6aa4879 (\"compress/isal: add ISA-L compression functionality\")\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n drivers/compress/isal/isal_compress_pmd_ops.c | 14 ++++----------\n 1 file changed, 4 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/isal_compress_pmd_ops.c\nindex fe9995992304..77ac6fcf21fc 100644\n--- a/drivers/compress/isal/isal_compress_pmd_ops.c\n+++ b/drivers/compress/isal/isal_compress_pmd_ops.c\n@@ -171,18 +171,12 @@ isal_comp_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id)\n \tif (qp == NULL)\n \t\treturn -EINVAL;\n \n-\tif (qp->stream != NULL)\n-\t\trte_free(qp->stream);\n-\n-\tif (qp->stream->level_buf != NULL)\n+\tif (qp->stream)\n \t\trte_free(qp->stream->level_buf);\n \n-\tif (qp->state != NULL)\n-\t\trte_free(qp->state);\n-\n-\tif (qp->processed_pkts != NULL)\n-\t\trte_ring_free(qp->processed_pkts);\n-\n+\trte_free(qp->state);\n+\trte_ring_free(qp->processed_pkts);\n+\trte_free(qp->stream);\n \trte_free(qp);\n \tdev->data->queue_pairs[qp_id] = NULL;\n \n", "prefixes": [] }{ "id": 53572, "url": "