get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53149,
    "url": "http://patches.dpdk.org/api/patches/53149/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/33816b0f26de3b8328ae49fb6c73ca200acd945b.1556547761.git.anatoly.burakov@intel.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": "<33816b0f26de3b8328ae49fb6c73ca200acd945b.1556547761.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/33816b0f26de3b8328ae49fb6c73ca200acd945b.1556547761.git.anatoly.burakov@intel.com",
    "date": "2019-04-29T14:22:50",
    "name": "ipc: harden message receive function",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "26973a1239d6593705225b85f9e3dd4e076fb6de",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/33816b0f26de3b8328ae49fb6c73ca200acd945b.1556547761.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 4503,
            "url": "http://patches.dpdk.org/api/series/4503/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4503",
            "date": "2019-04-29T14:22:50",
            "name": "ipc: harden message receive function",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4503/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53149/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/53149/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 7F5DD1B10E;\n\tMon, 29 Apr 2019 16:22:55 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 043CE7D05;\n\tMon, 29 Apr 2019 16:22:53 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Apr 2019 07:22:52 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.125])\n\tby orsmga004.jf.intel.com with ESMTP; 29 Apr 2019 07:22:51 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.60,409,1549958400\"; d=\"scan'208\";a=\"295483672\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "keith.wiles@intel.com, herakliusz.lipiec@intel.com,\n\tferruh.yigit@intel.com, stable@dpdk.org",
        "Date": "Mon, 29 Apr 2019 15:22:50 +0100",
        "Message-Id": "<33816b0f26de3b8328ae49fb6c73ca200acd945b.1556547761.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH] ipc: harden message receive function",
        "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": "Currently, IPC does not check received messages for invalid data\nand passes them to user code unchanged. This may result in buffer\noverruns on reading message data. Fix this by checking the message\nlength and fd number on receive, and discard any messages that\nare not valid.\n\nFixes: bacaa2754017 (\"eal: add channel for multi-process communication\")\nCc: stable@dpdk.org\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/eal_common_proc.c | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c\nindex b46d644b3..d4adabc70 100644\n--- a/lib/librte_eal/common/eal_common_proc.c\n+++ b/lib/librte_eal/common/eal_common_proc.c\n@@ -285,7 +285,15 @@ read_msg(struct mp_msg_internal *m, struct sockaddr_un *s)\n \t\t\tbreak;\n \t\t}\n \t}\n-\n+\t/* sanity-check the response */\n+\tif (m->msg.num_fds < 0 || m->msg.num_fds > RTE_MP_MAX_FD_NUM) {\n+\t\tRTE_LOG(ERR, EAL, \"invalid number of fd's received\\n\");\n+\t\treturn -1;\n+\t}\n+\tif (m->msg.len_param < 0 || m->msg.len_param > RTE_MP_MAX_PARAM_LEN) {\n+\t\tRTE_LOG(ERR, EAL, \"invalid received data length\\n\");\n+\t\treturn -1;\n+\t}\n \treturn 0;\n }\n \n",
    "prefixes": []
}