get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2222656,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2222656/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260413101453.495549-1-hossu.alexandru@gmail.com/",
    "project": {
        "id": 21,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/21/?format=api",
        "name": "Linux Tegra Development",
        "link_name": "linux-tegra",
        "list_id": "linux-tegra.vger.kernel.org",
        "list_email": "linux-tegra@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260413101453.495549-1-hossu.alexandru@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-13T10:14:53",
    "name": "[v2,1/3] staging: nvec: fix use-after-free in nvec_rx_completed()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "fe00dd2fcc1696ff4f43d233bb5bf69cae32a32b",
    "submitter": {
        "id": 92777,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/92777/?format=api",
        "name": "Alexandru Hossu",
        "email": "hossu.alexandru@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-tegra/patch/20260413101453.495549-1-hossu.alexandru@gmail.com/mbox/",
    "series": [
        {
            "id": 499677,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/499677/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-tegra/list/?series=499677",
            "date": "2026-04-13T10:14:53",
            "name": "[v2,1/3] staging: nvec: fix use-after-free in nvec_rx_completed()",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/499677/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222656/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222656/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-tegra+bounces-13743-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-tegra@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=R7jO8Tld;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13743-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"R7jO8Tld\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.208.49",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvNsN3CChz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 20:28:08 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id AADC4308128D\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 10:16:24 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 8D6683B4EA1;\n\tMon, 13 Apr 2026 10:16:24 +0000 (UTC)",
            "from mail-ed1-f49.google.com (mail-ed1-f49.google.com\n [209.85.208.49])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id E32F53B19CE\n\tfor <linux-tegra@vger.kernel.org>; Mon, 13 Apr 2026 10:16:22 +0000 (UTC)",
            "by mail-ed1-f49.google.com with SMTP id\n 4fb4d7f45d1cf-66f8f556f39so5626400a12.0\n        for <linux-tegra@vger.kernel.org>;\n Mon, 13 Apr 2026 03:16:22 -0700 (PDT)",
            "from ahossu.residents.sin.openfiber.nl ([88.202.160.248])\n        by smtp.gmail.com with ESMTPSA id\n a640c23a62f3a-b9d6e5c5af1sm291657566b.39.2026.04.13.03.16.20\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Mon, 13 Apr 2026 03:16:20 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776075384; cv=none;\n b=u92aKInPCuWsRbG+V6F4YtQub0r8cEDHczmilcNzRjbsgUGxjbRGXmcmy/q52Lo4yD6lnv7akECqE126KXljO5N+T9jBXeqlvVURfdLUEssGyIxT2QHnwwJUdM+Bh2QrA9NPFP1AhZtaGXxh1+hPt41UfqajAeOnK7yEoq/f1s0=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776075384; c=relaxed/simple;\n\tbh=PBKLdUulI+4wyDp2nI9P3PFNUeySMHyOOvVbWnDw444=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=qCw2PLTNW6T7EPEe91PFkRhhN0hl3eVDGjOc/AVmKu3jWjwkUgNODVtPRxhmv+Uevdv9MkhQP83gkwogmunXeXv+qsGDbgUyI0cL1L29drKVXIIEP0uG2U09NPldhMXFQdKPUc9PyXGbE41yhZ2hyV0ZVe3DEotfHlZiz9GfzDQ=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=R7jO8Tld; arc=none smtp.client-ip=209.85.208.49",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776075381; x=1776680181;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=3e6stqMXmYaFiFCQxO4DpERHs9UT6BI5slx7/qV13Ew=;\n        b=R7jO8TldyQRDWHTX45jEMlmQhAQBaGzAg4WuFDafDGgCcleim1jje7urD6QS56BHGr\n         W2nBFkaIml9GoJ7GIedtnHuImOskv0DRVpaZyvUZDjnnemrWOCG0rWrBQmZuErAqGDW2\n         RNmLslzvX/HFh1LDIAkhRWt73rvUFdSlHaGMtNWzirLCD/cLa0ISzGfbrvuJQoLAiWUY\n         EHMOmjr8M0an3bwLZSxnAiVQe995sfDp3wagxoEXbZuPeWyq2xZtcNqk0ucToWTYcc45\n         q3AF/t7vQqP33Qv2ufB9Up3Mgk1xWKrtCcfnv1w7kt6lKqVBDAjgh7qcSAJ1H0I7WQ8S\n         wKLg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776075381; x=1776680181;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=3e6stqMXmYaFiFCQxO4DpERHs9UT6BI5slx7/qV13Ew=;\n        b=EiNQ5idXcyHZieoIPjBtEyaStaj7WOTD0j+LZYDzLKz1QSxuIR88flx4N2Gx37kVVA\n         gyOjDJDL+HZgsIP/YBXv+asd2uc8/ConpaHZVWRgtl6Os7zwkQP3UBcuYi+Sk11eARTY\n         fVaHvDAoluIeNsghUhSSdPUENI5BuKviS06+ZSD8wAqsyZRQ8UwbXlmfuiKIOgp2KnM6\n         zj80BZIux8n2EuKzT+9zdlyozUjyM9ugseH17130vQ8nbepI3pQ7pd4hQBQeMap+My1P\n         amPxFVwd5Df5Y5+vP8gkFYSag/69d4WOKyksip/QvyEyyvMYjx0HELwp9MCWYZgR8Nfk\n         iw9w==",
        "X-Gm-Message-State": "AOJu0YzjQpE7dZ/LbRgg6VJ5aGoBl1f4UJgJGBqzgdc/YCkmfdce5mrg\n\tujwa0MuJ4KuE51NLXkxcczcYGCzZnRlpFnBqwZS8UIN+r9Z+K/JyodeuE6+05Vpq2qk=",
        "X-Gm-Gg": "AeBDiesjJU3ttn0sRLWZMNECGUDUFZAbyDCA0xT6hU+Vb9StN/RcLdvhO38c3ELzGtc\n\tSz6DVJ0DAY7G9ztEUSI9SIui7aP6f5Hyz/QVkb0CJ1T1sGwV+6eVVHGIl8F1fW6BwrUbPZUusUt\n\t6chvxVLElUvmReSzjuESBivquOs3H64Kxay1bmTj0IlsmLXPQt4WcsRSh8u2raIx874DRjS0XJ+\n\tAK9CXxCQAT/2DxlyLTa75dt02poECCSRlOZwBTaifUfHMwsDy9NfTuDR1hibjijOMHVZcHOlo98\n\t8PBEVpOnYhw3XDl7/GtaqSHmXq3YJ4D1iVMgoVcjlYKqLd/RTHBwTIZlBq7T1e5VIjXPk5QRnkH\n\tWATVxeySdPK9gAs0BkKaD83FZSxngkkx9VOCzfdovJbfyWyFrLuh7T6bGf7uEZkW1+2nWxGNcZB\n\tNRYZk5teegiYl4+1FMUFpGTrFxJpfAHs5AxTUg2fGoH2W8MHcMdXifzJYLppNFB3kMyIkKrzpss\n\t3kYT9QlrhHzcqRJ0+eUcaR1OSCXZmyslCqH3npQtH9zKvylBYuoD89cWV1je5/EIVH4P5pbIE2y\n\tuSTZ2g==",
        "X-Received": "by 2002:a17:907:1582:b0:b9a:cb5e:5354 with SMTP id\n a640c23a62f3a-b9d727a0815mr506275266b.16.1776075380789;\n        Mon, 13 Apr 2026 03:16:20 -0700 (PDT)",
        "From": "Alexandru Hossu <hossu.alexandru@gmail.com>",
        "To": "linux-tegra@vger.kernel.org",
        "Cc": "error27@gmail.com,\n\tmarvin24@gmx.de,\n\tgregkh@linuxfoundation.org,\n\tlinux-staging@lists.linux.dev,\n\tlinux-kernel@vger.kernel.org,\n\thossu.alexandru@gmail.com",
        "Subject": "[PATCH v2 1/3] staging: nvec: fix use-after-free in\n nvec_rx_completed()",
        "Date": "Mon, 13 Apr 2026 12:14:53 +0200",
        "Message-ID": "<20260413101453.495549-1-hossu.alexandru@gmail.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260412205057.386856-3-hossu.alexandru@gmail.com>",
        "References": "<20260412205057.386856-3-hossu.alexandru@gmail.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-tegra@vger.kernel.org",
        "List-Id": "<linux-tegra.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-tegra+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-tegra+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "In nvec_rx_completed(), when an incomplete RX transfer is detected,\nnvec_msg_free() is called to return the message back to the pool by\nclearing its 'used' atomic flag. Immediately after this, the code\naccesses nvec->rx->data[0] to check the message type.\n\nSince nvec_msg_free() marks the pool slot as available via atomic_set(),\nany concurrent or subsequent call to nvec_msg_alloc() could claim that\nsame slot and overwrite its data[] array. Reading nvec->rx->data[0] after\nfreeing the message is therefore a use-after-free.\n\nFix this by saving the message type byte before calling nvec_msg_free(),\nthen using the saved value for the battery quirk check.\n\nFixes: d6bdcf2e1019 (\"staging: nvec: Add battery quirk to ignore incomplete responses\")\nSigned-off-by: Alexandru Hossu <hossu.alexandru@gmail.com>\n---\nv2:\n - Add Fixes tag (Dan Carpenter)\n - Remove obvious comment (Dan Carpenter)\n - Move declaration to start of block (Dan Carpenter)\n\n drivers/staging/nvec/nvec.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c\nindex 952c5a849a56..2a3499dd4d63 100644\n--- a/drivers/staging/nvec/nvec.c\n+++ b/drivers/staging/nvec/nvec.c\n@@ -494,6 +494,8 @@ static void nvec_tx_completed(struct nvec_chip *nvec)\n static void nvec_rx_completed(struct nvec_chip *nvec)\n {\n \tif (nvec->rx->pos != nvec_msg_size(nvec->rx)) {\n+\t\tunsigned char msg_type = nvec->rx->data[0];\n+\n \t\tdev_err(nvec->dev, \"RX incomplete: Expected %u bytes, got %u\\n\",\n \t\t\t(uint)nvec_msg_size(nvec->rx),\n \t\t\t(uint)nvec->rx->pos);\n@@ -502,7 +504,7 @@ static void nvec_rx_completed(struct nvec_chip *nvec)\n \t\tnvec->state = 0;\n \n \t\t/* Battery quirk - Often incomplete, and likes to crash */\n-\t\tif (nvec->rx->data[0] == NVEC_BAT)\n+\t\tif (msg_type == NVEC_BAT)\n \t\t\tcomplete(&nvec->ec_transfer);\n \n \t\treturn;\n",
    "prefixes": [
        "v2",
        "1/3"
    ]
}