get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/138305/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 138305,
    "url": "https://patches.dpdk.org/api/patches/138305/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240313060208.17791-1-rnagadheeraj@marvell.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": "<20240313060208.17791-1-rnagadheeraj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240313060208.17791-1-rnagadheeraj@marvell.com",
    "date": "2024-03-13T06:02:08",
    "name": "compress/nitrox: fix dereference after null check",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a6015fa6c1afcd939a550d3c450a6f0ca31c1608",
    "submitter": {
        "id": 1365,
        "url": "https://patches.dpdk.org/api/people/1365/?format=api",
        "name": "Nagadheeraj Rottela",
        "email": "rnagadheeraj@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "https://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240313060208.17791-1-rnagadheeraj@marvell.com/mbox/",
    "series": [
        {
            "id": 31491,
            "url": "https://patches.dpdk.org/api/series/31491/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31491",
            "date": "2024-03-13T06:02:08",
            "name": "compress/nitrox: fix dereference after null check",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/31491/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/138305/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/138305/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 983A543C9A;\n\tWed, 13 Mar 2024 07:02:39 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 71E2240689;\n\tWed, 13 Mar 2024 07:02:39 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id DF86140633\n for <dev@dpdk.org>; Wed, 13 Mar 2024 07:02:37 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 42D3bVwf014957; Tue, 12 Mar 2024 23:02:37 -0700",
            "from dc6wp-exch02.marvell.com ([4.21.29.225])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3wtt8htms3-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 12 Mar 2024 23:02:36 -0700 (PDT)",
            "from DC6WP-EXCH02.marvell.com (10.76.176.209) by\n DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1258.12; Tue, 12 Mar 2024 23:02:35 -0700",
            "from hyd1399.caveonetworks.com (10.69.176.80) by\n DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id\n 15.2.1258.12 via Frontend Transport; Tue, 12 Mar 2024 23:02:33 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding:content-type; s=pfpt0220; bh=aDb8Egni\n oJCynq1XPjpsV+A+4Dx7LWFxgqoeSi0hQQM=; b=RXxCaoQh85XgE0DehAHoNLBd\n tr/a9Y0QMZkS34i3sznyzyASQmb/x3XalxyXYD2R4bV+kDeJTqvT9dffebLojfmm\n j9xuXNezTc9e4jx2VytrC/KdRDhHqFOIJjqOcrT6jzqCRjGp2+5uKiIdaVUjlh+4\n VKPT7SwH46su9kh65ezkj8xFzgfUNLa2LcwpbiEtIZziiml4mRcOPXXVuFTpjClV\n WToZ7uyLFlxUvt7U8OUE6q7F8ITUix+fGVsbJKIeiIHLFGUPm9fNnGbhGREbhPeP\n hD0GLCrsbaGdBEAbNn2/P8+13o5M5VANnbZNIe1xQiNER9cUTyqNeiWfjYAGfg==",
        "From": "Nagadheeraj Rottela <rnagadheeraj@marvell.com>",
        "To": "<gakhil@marvell.com>, <fanzhang.oss@gmail.com>, <ashishg@marvell.com>",
        "CC": "<dev@dpdk.org>, Nagadheeraj Rottela <rnagadheeraj@marvell.com>",
        "Subject": "[PATCH] compress/nitrox: fix dereference after null check",
        "Date": "Wed, 13 Mar 2024 11:32:08 +0530",
        "Message-ID": "<20240313060208.17791-1-rnagadheeraj@marvell.com>",
        "X-Mailer": "git-send-email 2.42.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "a3gsjbBGACBUadfaPB7Awt_ZquEJ5hRB",
        "X-Proofpoint-GUID": "a3gsjbBGACBUadfaPB7Awt_ZquEJ5hRB",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2024-03-13_05,2024-03-12_01,2023-05-22_02",
        "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": "In nitrox_check_comp_req() while updating the last byte during FINAL\nflush there is possibility of accessing null mbuf in two rare cases.\nFirst case is when the application changes the dst mbuf between\nenqueue and dequeue. Second case is when data length reported by\nhardware is greater than the mbuf length. Fix this issue by adding\nmbuf null checks.\n\nCoverity issue: 415046\nFixes: f008628a6d08 (\"compress/nitrox: support stateless request\")\nSigned-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>\n---\n drivers/compress/nitrox/nitrox_comp_reqmgr.c | 10 ++++++++++\n 1 file changed, 10 insertions(+)",
    "diff": "diff --git a/drivers/compress/nitrox/nitrox_comp_reqmgr.c b/drivers/compress/nitrox/nitrox_comp_reqmgr.c\nindex 0a25672d6e..ca45c3e322 100644\n--- a/drivers/compress/nitrox/nitrox_comp_reqmgr.c\n+++ b/drivers/compress/nitrox/nitrox_comp_reqmgr.c\n@@ -1096,10 +1096,20 @@ nitrox_check_comp_req(struct nitrox_softreq *sr, struct rte_comp_op **op)\n \t\tfor (; m && off > rte_pktmbuf_data_len(m); m = m->next)\n \t\t\toff -= rte_pktmbuf_data_len(m);\n \n+\t\tif (unlikely(m == NULL)) {\n+\t\t\terr = -EINVAL;\n+\t\t\tgoto exit;\n+\t\t}\n+\n \t\tmlen = rte_pktmbuf_data_len(m) - off;\n \t\tfor (; m && (datalen > mlen); m = m->next)\n \t\t\tdatalen -= mlen;\n \n+\t\tif (unlikely(m == NULL)) {\n+\t\t\terr = -EINVAL;\n+\t\t\tgoto exit;\n+\t\t}\n+\n \t\tlast_byte = rte_pktmbuf_mtod_offset(m, uint8_t *, datalen - 1);\n \t\t*last_byte = zip_res.w2.exbits & 0xFF;\n \t}\n",
    "prefixes": []
}