get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2229999,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229999/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429044752.4176397-25-alistair.francis@wdc.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260429044752.4176397-25-alistair.francis@wdc.com>",
    "date": "2026-04-29T04:47:25",
    "name": "[PULL,24/51] hw/intc: fix heap OOB in ACLINT MTIMER multi-socket",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "36c3c56495b3a4c1a6ec6919bea31d0723bb18c0",
    "submitter": {
        "id": 64571,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/64571/?format=api",
        "name": "Alistair Francis",
        "email": "alistair23@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429044752.4176397-25-alistair.francis@wdc.com/mbox/",
    "series": [
        {
            "id": 501983,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501983/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501983",
            "date": "2026-04-29T04:47:05",
            "name": "[PULL,01/51] hw/riscv/riscv-iommu: Use standard EN_PRI bit for PRI",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501983/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2229999/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2229999/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.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=rmD0JejQ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g54ck25tRz1yK5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 14:50:46 +1000 (AEST)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wHwsK-00058n-5f; Wed, 29 Apr 2026 00:50:16 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alistair23@gmail.com>)\n id 1wHwsI-000501-E6\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 00:50:14 -0400",
            "from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <alistair23@gmail.com>)\n id 1wHwsG-0000PC-0v\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 00:50:14 -0400",
            "by mail-pl1-x62e.google.com with SMTP id\n d9443c01a7336-2b2429f98d0so72267465ad.2\n for <qemu-devel@nongnu.org>; Tue, 28 Apr 2026 21:50:11 -0700 (PDT)",
            "from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b988772ae8sm7756145ad.7.2026.04.28.21.50.05\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Apr 2026 21:50:10 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777438211; x=1778043011; darn=nongnu.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=yMpS+oxPJGbRpex+VelLT6bbUjNH9wP4CLelzYLvWOg=;\n b=rmD0JejQu8AW2AthOjFd6LgOkAMBv8tsp/2BFseC3dwGbpKE6eiZDx+ZaNznBXaDyX\n VrpXdZbmZdVCYaLw2gXwtV5eeoVhYSeVJXzoJX0WBVpBXx8sHzky6qGL+Ss156WZvfQe\n Wv27oaCsAOQiPazRLI0y+pNl8KaymTMIBSLwScOVciSysdVwg3TVy3jsjjuSnHgnxQq2\n ZsJ/omd6zo1sLgMCAlU5RiIP94FvcjUhluPJUv1y9UCsmwsw2czHscMuyy2dd+RmhGvI\n TOxX22077jRT5EHilXBZjEw6acFKaW4duCE+cgKv3xjygNwQOZmpEHxEN8Tzp046JTxd\n j5jA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777438211; x=1778043011;\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=yMpS+oxPJGbRpex+VelLT6bbUjNH9wP4CLelzYLvWOg=;\n b=USTQA5Exb/WwEFo1cMBITsomm01Q8f4/MhRzUL6MFLXyJtggRWxulHYHJHuObpb+ie\n Saj8/zmg6AoqlybLZA0R5culyHfhDMwxb294y7vYiccr9H9I1hU3HNSTQD2lcys9SxLh\n shEsYYprP3NNNJLifszgHefIgl6P9PWeV9wMbZUuBZG3YiMfWUfrvaxAxQJSYjEsQLhO\n A1R6i6CjzvuHDjV00APNSePSXNxgdlxSWx27If7ui8ci93k9+S7HfjyqVPZnqnZhs+KL\n MDz6dcWrcUIOZr5kAPr0mITwUoi05/63vfyXTPh+cJIoE5nSQVNwDKv6gTrmrsST7hFt\n Mk3w==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ/5ncJ8ql+TVGcQvJp4650fdGOlvSNWy4vyYkLyqGVmhuGlmIzbuRKHJJ1bypMvHNRrl7fUwQQk6Vn8@nongnu.org",
        "X-Gm-Message-State": "AOJu0YzWJOyWpNB8jE5CJEnmaKJKoetsJ4ES+q17yuL1XjyAtdq5EZAd\n Py3cYpQkbWTzXwGgEG/D0aiZrsW/6xbE3gc3AI694EcdPpNKwP6ZJJT1",
        "X-Gm-Gg": "AeBDiesEU0aNx6nxPXU3rrwlwt1w1af0BF0QyIJE2pcM866/Igu6V3J2pYKBc3jtBJ7\n nWLLN+kgH3LAfri6lZn5ipW1dnF6s8b16TYCLinY7BfWQ6jKeGRFQJMxEqbsriDsDTnbjI02RXR\n x0HlRvjtHnN1IZyKZ426B/CkvkuqogLud1G7s7iIkMA7MeHI7Th3ezY/jtvnfLJkNNHbTYMW5R6\n NQ2Tx/8XiPH0nUWZuN4FtEHKiWwl3LNbIfCAKxYqHz+ghfkJTGrm9xDyOISpQCYxRqMxQnOmWE6\n x0I45AavT/pKYLhiR04yCa7RhGUwIsARoMGU4WP5qj2fV08PrBvo10FZqcIAfiPAZWSewsviuj0\n H9FsaK4MPExlzIQMBoX/d6Wcg+m4leO4x6HS6gnK1e0iprlmZ0dsLoQr0WyGlOtOh25ypbnW9uW\n VFboMqN0rCSY/hbcv/+4gYT2kV8kXdEehnvKuseMX5bc0dvuTMyAq8xR3kDQLaQZU=",
        "X-Received": "by 2002:a17:903:2a8b:b0:2b9:8e63:71c8 with SMTP id\n d9443c01a7336-2b98e63730amr751005ad.29.1777438210678;\n Tue, 28 Apr 2026 21:50:10 -0700 (PDT)",
        "From": "alistair23@gmail.com",
        "X-Google-Original-From": "alistair.francis@wdc.com",
        "To": "palmer@dabbelt.com, liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com,\n zhiwei_liu@linux.alibaba.com, chao.liu.zevorn@gmail.com,\n qemu-riscv@nongnu.org, qemu-devel@nongnu.org",
        "Cc": "alistair23@gmail.com,\n =?utf-8?q?Sebasti=C3=A1n_Alba_Vives?= <sebasjosue84@gmail.com>,\n qemu-security@nongnu.org, Alistair Francis <alistair.francis@wdc.com>",
        "Subject": "[PULL 24/51] hw/intc: fix heap OOB in ACLINT MTIMER multi-socket",
        "Date": "Wed, 29 Apr 2026 14:47:25 +1000",
        "Message-ID": "<20260429044752.4176397-25-alistair.francis@wdc.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260429044752.4176397-1-alistair.francis@wdc.com>",
        "References": "<20260429044752.4176397-1-alistair.francis@wdc.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::62e;\n envelope-from=alistair23@gmail.com; helo=mail-pl1-x62e.google.com",
        "X-Spam_score_int": "-17",
        "X-Spam_score": "-1.8",
        "X-Spam_bar": "-",
        "X-Spam_report": "(-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "From: Sebastián Alba Vives <sebasjosue84@gmail.com>\n\nThe MMIO read/write handlers index timecmp[] with the absolute hartid\n(hartid_base + offset) but the array is allocated with num_harts\nelements. In multi-socket configurations with hartid_base > 0 this\ncauses heap OOB access in the QEMU process.\n\nFix by using the relative offset for array indexing.\n\nCc: qemu-security@nongnu.org\nSigned-off-by: Sebastián Alba Vives <sebasjosue84@gmail.com>\nReviewed-by: Alistair Francis <alistair.francis@wdc.com>\nMessage-ID: <20260401053853.10473-2-sebasjosue84@gmail.com>\nSigned-off-by: Alistair Francis <alistair.francis@wdc.com>\n---\n hw/intc/riscv_aclint.c | 10 ++++++----\n 1 file changed, 6 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c\nindex 9c1491bd04..e27e5fb394 100644\n--- a/hw/intc/riscv_aclint.c\n+++ b/hw/intc/riscv_aclint.c\n@@ -131,6 +131,7 @@ static uint64_t riscv_aclint_mtimer_read(void *opaque, hwaddr addr,\n         addr < (mtimer->timecmp_base + (mtimer->num_harts << 3))) {\n         size_t hartid = mtimer->hartid_base +\n                         ((addr - mtimer->timecmp_base) >> 3);\n+        size_t hartid_offset = hartid - mtimer->hartid_base;\n         CPUState *cpu = cpu_by_arch_id(hartid);\n         CPURISCVState *env = cpu ? cpu_env(cpu) : NULL;\n         if (!env) {\n@@ -138,11 +139,11 @@ static uint64_t riscv_aclint_mtimer_read(void *opaque, hwaddr addr,\n                           \"aclint-mtimer: invalid hartid: %zu\", hartid);\n         } else if ((addr & 0x7) == 0) {\n             /* timecmp_lo for RV32/RV64 or timecmp for RV64 */\n-            uint64_t timecmp = mtimer->timecmp[hartid];\n+            uint64_t timecmp = mtimer->timecmp[hartid_offset];\n             return (size == 4) ? (timecmp & 0xFFFFFFFF) : timecmp;\n         } else if ((addr & 0x7) == 4) {\n             /* timecmp_hi */\n-            uint64_t timecmp = mtimer->timecmp[hartid];\n+            uint64_t timecmp = mtimer->timecmp[hartid_offset];\n             return (timecmp >> 32) & 0xFFFFFFFF;\n         } else {\n             qemu_log_mask(LOG_UNIMP,\n@@ -174,6 +175,7 @@ static void riscv_aclint_mtimer_write(void *opaque, hwaddr addr,\n         addr < (mtimer->timecmp_base + (mtimer->num_harts << 3))) {\n         size_t hartid = mtimer->hartid_base +\n                         ((addr - mtimer->timecmp_base) >> 3);\n+        size_t hartid_offset = hartid - mtimer->hartid_base;\n         CPUState *cpu = cpu_by_arch_id(hartid);\n         CPURISCVState *env = cpu ? cpu_env(cpu) : NULL;\n         if (!env) {\n@@ -182,7 +184,7 @@ static void riscv_aclint_mtimer_write(void *opaque, hwaddr addr,\n         } else if ((addr & 0x7) == 0) {\n             if (size == 4) {\n                 /* timecmp_lo for RV32/RV64 */\n-                uint64_t timecmp_hi = mtimer->timecmp[hartid] >> 32;\n+                uint64_t timecmp_hi = mtimer->timecmp[hartid_offset] >> 32;\n                 riscv_aclint_mtimer_write_timecmp(mtimer, RISCV_CPU(cpu), hartid,\n                     timecmp_hi << 32 | (value & 0xFFFFFFFF));\n             } else {\n@@ -193,7 +195,7 @@ static void riscv_aclint_mtimer_write(void *opaque, hwaddr addr,\n         } else if ((addr & 0x7) == 4) {\n             if (size == 4) {\n                 /* timecmp_hi for RV32/RV64 */\n-                uint64_t timecmp_lo = mtimer->timecmp[hartid];\n+                uint64_t timecmp_lo = mtimer->timecmp[hartid_offset];\n                 riscv_aclint_mtimer_write_timecmp(mtimer, RISCV_CPU(cpu), hartid,\n                     value << 32 | (timecmp_lo & 0xFFFFFFFF));\n             } else {\n",
    "prefixes": [
        "PULL",
        "24/51"
    ]
}