get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2217704,
    "url": "http://patchwork.ozlabs.org/api/patches/2217704/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260330115017.256211-6-pbonzini@redhat.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/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": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260330115017.256211-6-pbonzini@redhat.com>",
    "list_archive_url": null,
    "date": "2026-03-30T11:50:09",
    "name": "[PULL,05/12] hpet: fix bounds check for s->timer[]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "d54819f752e5fb408c487584bc087acc085011a0",
    "submitter": {
        "id": 2701,
        "url": "http://patchwork.ozlabs.org/api/people/2701/?format=api",
        "name": "Paolo Bonzini",
        "email": "pbonzini@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260330115017.256211-6-pbonzini@redhat.com/mbox/",
    "series": [
        {
            "id": 498008,
            "url": "http://patchwork.ozlabs.org/api/series/498008/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498008",
            "date": "2026-03-30T11:50:04",
            "name": "[PULL,01/12] meson.build: remove i386-softmmu WHPX support",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498008/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217704/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217704/checks/",
    "tags": {},
    "related": [],
    "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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=GL6lC1BH;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=Nw+H6iCT;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists.gnu.org (lists.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 4fkqND5GXxz1yG8\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 30 Mar 2026 22:51:40 +1100 (AEDT)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w7B97-0003bV-Ck; Mon, 30 Mar 2026 07:51:17 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1w7B8h-0003Rk-Uf\n for qemu-devel@nongnu.org; Mon, 30 Mar 2026 07:50:40 -0400",
            "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1w7B8f-0005wP-VM\n for qemu-devel@nongnu.org; Mon, 30 Mar 2026 07:50:39 -0400",
            "from mail-wr1-f70.google.com (mail-wr1-f70.google.com\n [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-269-Vno_V2PkOwyCRYN7gdjzEw-1; Mon, 30 Mar 2026 07:50:35 -0400",
            "by mail-wr1-f70.google.com with SMTP id\n ffacd0b85a97d-43cfc3bf7f6so1449277f8f.2\n for <qemu-devel@nongnu.org>; Mon, 30 Mar 2026 04:50:35 -0700 (PDT)",
            "from [192.168.10.48] ([151.49.85.67])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48727c0cdf6sm221937835e9.2.2026.03.30.04.50.30\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 30 Mar 2026 04:50:30 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1774871436;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=5fKt7A2FD1i1SFTtrZ6g0b8Qc8madY+JGGQ0SAw4LSg=;\n b=GL6lC1BHccK6bWNl+fR1DlLwW+cdK2zcrIYDE/QaGinB83D7G5o0OI05b4HM2lC3LO239T\n xd4vtID+xu/oUAzoPfwlvAaVmCxdN7yDoPKuCBhKKNKzs8aNjlDZyorUJNtd14SFUMkidP\n rK5xBsgpkFOmy8N4nK62dLoVFwRiNRk=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1774871433; x=1775476233; 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=5fKt7A2FD1i1SFTtrZ6g0b8Qc8madY+JGGQ0SAw4LSg=;\n b=Nw+H6iCTgyJxRyB1285wQaitr/8FF7t+KGxyutvLIGUaTmcQq9y+ijK3y1gltjfdD3\n OKmCd7ALWzWgJCVPjMaLeGj9e//X1EyVcaxd76qcUiIDf5sFiCcKd4BdUTdYNyXvAchX\n lanYyEU5dQuImwgnGfTcb7PeQcQIsp925vBgUCru7/VB5+OR2CftwZCHgSRSQvAoNFAl\n aNDdrvLCrjKo4HKvAL96gehwbUf3kuyeJ3nW8PTX/hcpjwISWIB6/VVwOfsM/LFfFHPU\n HvUl5pac5tmc++ewV2mlrNj/akKIwFmQFViysWMUx5g5pH5KgIDXx+MqsOFyUliTh8+K\n jHQA=="
        ],
        "X-MC-Unique": "Vno_V2PkOwyCRYN7gdjzEw-1",
        "X-Mimecast-MFC-AGG-ID": "Vno_V2PkOwyCRYN7gdjzEw_1774871435",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774871433; x=1775476233;\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=5fKt7A2FD1i1SFTtrZ6g0b8Qc8madY+JGGQ0SAw4LSg=;\n b=Mqm6DCu8KvZnvXx2dONzRUWwGw+NeM/57tVIAab21aH/lh/d0bkoKlilJK3mr+AP16\n lzODYGf2rXbkzmQaJgFDcyolM+K1mC5xycLMRh69pZdLtHZUyzDkRi0G1OjML5O4RPX7\n MslJ6vAyLg8zGeHDCTo6eFF1xxf7SgKLH/lYmBK5woYOn2EYrqKYZKc8Tn2b9uImlCki\n Y6+gz32tnOhwCtEb+kCnj/23FOlm/Xvu8EqxYpnhYgl+xpCUl7tONslcQwqTzdRWKw0S\n +8mly5RQZLzch03Q8lMJ8PsJuIxfq8DBmxXNdWAzE64uo1UsFw3HOBLNXjZvTkdCqoVh\n aWUQ==",
        "X-Gm-Message-State": "AOJu0YxuQ9KrS61OD/SX6bHmhdMZ26WXznXemf0LzWf4qb6uMzVHLe7z\n KkZ2sK+DoTfa4mcRK7c/t8KXDNWYk+ggm6C+5scHckq9SnRpVj2QanKLtvpHkvUHJ3/mNzGQqZ8\n 9ieGJiSL2v/ZQe5INbjysjcNcIb7P07/9uNxwQrqNRMOXDtSFGV3fMkSHPGq1BW0ItZ8ZtZHEL9\n sF3+eVPUMJZnDt4awEPDjH+O72k2JFWTbo9vhBIjM/",
        "X-Gm-Gg": "ATEYQzzuQqODn0aqb3JIGR+Iur+QrblnVqLf9EqDiBht1aNHnYAe8TQvBmZWHdTtW/6\n g+JUm7pk5cEyVfwkT67BW2lGk9c6LYM9sNVvGPQWfInVensGhypG8aQxoxvlEXwST9QC5dK4fA0\n AVJcmbb63MR3ruLm0WdlWeN9WrFEoTCMdLCGoPHpF4bBLNIrHR3A48GbaB314ooURx/TPzQLEml\n z7b9NzfwSSCgNLlx80475kWv6mK9ifAVWjfJsg8b0JOr6EYy+k8Es3H1uSXLa1bnXCBcUifZSNd\n sl2VsVmkj3nlftmC78k4NQmNb4kb4Jv1A06DXiQTwcTiG1iE3aDegx+yOZiJx9cS6OlISPw3nud\n V4Shvm1F6nZYgNWhn44otH8b/jhZ8VKdtT7s9Ysf4v3T2oFrxaz2NDSLmuuWLCfgsZcXrsOaP8I\n mtxl1iXOkQ+bHMYqcy0AGSrX5s",
        "X-Received": [
            "by 2002:a05:600c:1593:b0:485:3bc7:a231 with SMTP id\n 5b1f17b1804b1-487341a3df0mr70764595e9.29.1774871433294;\n Mon, 30 Mar 2026 04:50:33 -0700 (PDT)",
            "by 2002:a05:600c:1593:b0:485:3bc7:a231 with SMTP id\n 5b1f17b1804b1-487341a3df0mr70764275e9.29.1774871432709;\n Mon, 30 Mar 2026 04:50:32 -0700 (PDT)"
        ],
        "From": "Paolo Bonzini <pbonzini@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "\"Yuma Kurogome, Ricerca Security, Inc.\" <yumak@ricsec.co.jp>",
        "Subject": "[PULL 05/12] hpet: fix bounds check for s->timer[]",
        "Date": "Mon, 30 Mar 2026 13:50:09 +0200",
        "Message-ID": "<20260330115017.256211-6-pbonzini@redhat.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260330115017.256211-1-pbonzini@redhat.com>",
        "References": "<20260330115017.256211-1-pbonzini@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.129.124;\n envelope-from=pbonzini@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com",
        "X-Spam_score_int": "-5",
        "X-Spam_score": "-0.6",
        "X-Spam_bar": "/",
        "X-Spam_report": "(-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=1, SPF_HELO_PASS=-0.001,\n SPF_PASS=-0.001 autolearn=no 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": "Fix an off-by-one issue in QEMU's HPET read and write MMIO handlers.\nBoth handlers check timer_id > s->num_timers instead of timer_id >=\ns->num_timers, allowing a guest to access one timer beyond the valid\nrange.\n\nThe affected slot is initialized properly in hpet_realize, which goes\nthrough all HPET_MAX_TIMERS elements of the array, so even though\nit is not reset in hpet_reset() the bug does not cause any use of\nuninitialized host memory.  Because of this, and also because (even\nthough HPET_MAX_TIMERS is 32) the HPET only has room for 24 timers in\nits MMIO region, the bug has no security implications.\n\nCommit 869b0afa4fa (\"rust/hpet: Drop BqlCell wrapper for num_timers\",\n2025-06-06) silently fixed the same bug in rust/hw/timer/hpet/src/device.rs.\n\nReported-by: Yuma Kurogome, Ricerca Security, Inc. <yumak@ricsec.co.jp>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n---\n hw/timer/hpet.c | 11 +++++++----\n 1 file changed, 7 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c\nindex 767093c431a..42285cff762 100644\n--- a/hw/timer/hpet.c\n+++ b/hw/timer/hpet.c\n@@ -464,13 +464,14 @@ static uint64_t hpet_ram_read(void *opaque, hwaddr addr,\n         }\n     } else {\n         uint8_t timer_id = (addr - 0x100) / 0x20;\n-        HPETTimer *timer = &s->timer[timer_id];\n+        HPETTimer *timer;\n \n-        if (timer_id > s->num_timers) {\n+        if (timer_id >= s->num_timers) {\n             trace_hpet_timer_id_out_of_range(timer_id);\n             return 0;\n         }\n \n+        timer = &s->timer[timer_id];\n         switch (addr & 0x1f) {\n         case HPET_TN_CFG: // including interrupt capabilities\n             return timer->config >> shift;\n@@ -564,13 +565,15 @@ static void hpet_ram_write(void *opaque, hwaddr addr,\n         }\n     } else {\n         uint8_t timer_id = (addr - 0x100) / 0x20;\n-        HPETTimer *timer = &s->timer[timer_id];\n+        HPETTimer *timer;\n \n         trace_hpet_ram_write_timer_id(timer_id);\n-        if (timer_id > s->num_timers) {\n+        if (timer_id >= s->num_timers) {\n             trace_hpet_timer_id_out_of_range(timer_id);\n             return;\n         }\n+\n+        timer = &s->timer[timer_id];\n         switch (addr & 0x18) {\n         case HPET_TN_CFG:\n             trace_hpet_ram_write_tn_cfg(addr & 4);\n",
    "prefixes": [
        "PULL",
        "05/12"
    ]
}