get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2221760,
    "url": "http://patchwork.ozlabs.org/api/patches/2221760/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260410094115.229188-1-michael.zaidman@gmail.com/",
    "project": {
        "id": 35,
        "url": "http://patchwork.ozlabs.org/api/projects/35/?format=api",
        "name": "Linux I2C development",
        "link_name": "linux-i2c",
        "list_id": "linux-i2c.vger.kernel.org",
        "list_email": "linux-i2c@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260410094115.229188-1-michael.zaidman@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-10T09:41:15",
    "name": "HID: ft260: validate i2c input report length",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f42965cfe5b900d7d8d68c9f76067d7b336a4afa",
    "submitter": {
        "id": 5876,
        "url": "http://patchwork.ozlabs.org/api/people/5876/?format=api",
        "name": "Michael Zaidman",
        "email": "michael.zaidman@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260410094115.229188-1-michael.zaidman@gmail.com/mbox/",
    "series": [
        {
            "id": 499434,
            "url": "http://patchwork.ozlabs.org/api/series/499434/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/list/?series=499434",
            "date": "2026-04-10T09:41:15",
            "name": "HID: ft260: validate i2c input report length",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499434/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221760/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221760/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-i2c+bounces-17023-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-i2c@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=aKismof+;\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-i2c+bounces-17023-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=\"aKismof+\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.128.45",
            "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 4fsXBv5By6z1yGb\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 19:51:51 +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 49313313B8A1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 09:41:40 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 1EB4334AAE3;\n\tFri, 10 Apr 2026 09:41:32 +0000 (UTC)",
            "from mail-wm1-f45.google.com (mail-wm1-f45.google.com\n [209.85.128.45])\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 67EF133E351\n\tfor <linux-i2c@vger.kernel.org>; Fri, 10 Apr 2026 09:41:30 +0000 (UTC)",
            "by mail-wm1-f45.google.com with SMTP id\n 5b1f17b1804b1-4888375f735so17944555e9.3\n        for <linux-i2c@vger.kernel.org>; Fri, 10 Apr 2026 02:41:30 -0700 (PDT)",
            "from x2-evb57.xsight.ent (genie03-172-158.inter.net.il.\n [213.8.172.158])\n        by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488d5df2062sm18102255e9.12.2026.04.10.02.41.27\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 10 Apr 2026 02:41:28 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775814091; cv=none;\n b=f6QkRNCK55QrkGY3geE3Q6jElMqeZ3ns4CtSFdY0+UWHVE2nz4QJK0v0Ze95By/yPMb4UGrbXcTLQdaMqQl8OzZO5J3vEUq8hpAe466msncU5sFvvNd3gbe539qleQsnZL2kqzKdJmxhQpyZxWPRJcLA//9eJU7HuCdGhxNIgfc=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775814091; c=relaxed/simple;\n\tbh=eJX1yP3ycMOp+GPfJFr/Kg0BrgivZYOEuF4zUzf1F8Y=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=Y4yVQOfv9qNvfUYF6SgufOchY2QttOEpOM8FUeTTZBxItLelw4kEw7WlfKqMWKMPOo3x4q7X4txge+ks/yffF4gZTetAX7pSAgsOPgWliKcubF9R8GOeV7FEbMpRulKKvhz8Mqb8ewtQYoyC/F8QL9AMCpsthG4cyu6jBvqT/ko=",
        "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=aKismof+; arc=none smtp.client-ip=209.85.128.45",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775814089; x=1776418889;\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=bMDf5kG47sSh3LquTWW3lJq958x7ZFKaEtVYrO12TpQ=;\n        b=aKismof+eqTr2porbxa1qlFO/qfy6vxpyckEJTsZBHd2xo3GlfaoLm0Owjo5hhmhAA\n         0Ki7SDvPX3VL9FyXLRkEbxRrD73HkuZY31Tib1BuHrlBm1gcooHeDFtIj19+R/JrNuh+\n         VfUSMhDD1xZxSA+LUwn5PHjIxi9Om/3iUlx11dtO3YgJ0DhkpPLDAWkkQDyh2M+eWLMw\n         1FPc66ZYpEfhZ76kILn3360no+rfTgHukCnmH2wCj3zDKMSFMxDM1/4ewiZR7rMct2Cw\n         ZXBC/qjax54a5+gdlES/51UOAmwQcNLyrSGb3ea6ac2e5x6v1wL/khGyx8trEDYYGdLF\n         BlCw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775814089; x=1776418889;\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=bMDf5kG47sSh3LquTWW3lJq958x7ZFKaEtVYrO12TpQ=;\n        b=aBanb6wr/0Cy39c4h5JFjAX3J0aKdfA/aCG9WuuxOdB17fhGuRdjpL2x48JZrfu6cP\n         UuFS0Yd9NNBQh8yuKv6PAbzNKtWlI6FxZniLTk0wgwWfm+r2nUB14e2cpveGdXrwl1t/\n         k6X/29FGo9EXbR+1TGXhRkPRY5WfKn64AM2L9sJnUK2/pwK2iDZ3noKgzFi8U1FIjEq9\n         RPabBg2nazK0Q96uiOyTtiKa5MzgMOpdECPf03dYLhwAMMZqZI878U2o225V6hV80d/O\n         8y6NTGw9BVRZ2iFJz8eLe9DY+jTGVRxpwuvdxNKic4R9UIdsimaXiRR7n+jM7mgVf29t\n         fwZQ==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCUsbbEPKMiBPI2kDIy+CkN9gFKhUZsUPuQASqh8wiH3T+kT4IgAVUqVrwYGGdKcjaVlGUl+AcDHAQk=@vger.kernel.org",
        "X-Gm-Message-State": "AOJu0YwZ3S9edIZKGPBkvDupGus/fdmTsI7vr7zVGVqDAc3rP+9Uchw1\n\tPZeG1DFN7Soayac3GkwZxvCh/b7nbLfVi3NoCs+oMapqepAP7HH1Ic1Yx+BajS7R",
        "X-Gm-Gg": "AeBDietHG+jZCy5FobboJFkoATkDLnLvfkuwWeXyR4A1N14YpohH/g7ohlj31Z7ocFt\n\tC5WMvsIjOFSQ6RVAiSEApXW4BeeAF9wvUJwWG0Qk4jpJBLywNwoBpzb5fR4gytyFihUfx3y1kvC\n\t/fPrjKR2/ynLLu6HX26EztKbB1B6hdlBXGrauPW1wAy/rsR3PNrQFFCS+72lIbtAV+T0bW/Wyfj\n\tqpqej2C4TyAcrzQQ3YXJ9+v7PesbWjdScIrqeTTIkxulfABRux2fS+p3kC6gGcOilmpPeQIKhmV\n\tXtJ/BlgC77yPYOJWQ0t5RKza44FRjWRGPyAMB/XXoTe5bRURaRD3rR9CavX3m5MDC9cTk81Wsmt\n\tm9ndrMU2XVkjL2HmTAETlysEarloIbZU9q48xIJcd5lrnOC1RamZ3v6aQ6s43iqUUmzfMgyiI8V\n\t3iz6cuERFVsn5CN067MeLB/NPE/5K4k9GFnxILFSmRmRbYt/0mccsFu7eCmsqcq55+Zr6m",
        "X-Received": "by 2002:a05:600c:8b6b:b0:488:be21:54b9 with SMTP id\n 5b1f17b1804b1-488d67ce792mr29808725e9.8.1775814088482;\n        Fri, 10 Apr 2026 02:41:28 -0700 (PDT)",
        "From": "Michael Zaidman <michael.zaidman@gmail.com>",
        "To": "Jiri Kosina <jikos@kernel.org>,\n\tBenjamin Tissoires <bentiss@kernel.org>",
        "Cc": "=?utf-8?q?Sebasti=C3=A1n_Josu=C3=A9_Alba_Vives?= <sebasjosue84@gmail.com>,\n linux-i2c@vger.kernel.org, linux-input@vger.kernel.org,\n linux-kernel@vger.kernel.org, Michael Zaidman <michael.zaidman@gmail.com>",
        "Subject": "[PATCH] HID: ft260: validate i2c input report length",
        "Date": "Fri, 10 Apr 2026 12:41:15 +0300",
        "Message-Id": "<20260410094115.229188-1-michael.zaidman@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "\n <CAPnwWgPhb+owa69-pTADpqk=KMWH71EUT6cxwCeT5KGnBWk+Xg@mail.gmail.com>",
        "References": "\n <CAPnwWgPhb+owa69-pTADpqk=KMWH71EUT6cxwCeT5KGnBWk+Xg@mail.gmail.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-i2c@vger.kernel.org",
        "List-Id": "<linux-i2c.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-i2c+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-i2c+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Validate xfer->length against the actual HID report size in\nft260_raw_event() before using it as the memcpy length. A malicious\nor malfunctioning device could send a report with xfer->length\nexceeding the data actually present in the HID report, causing an\nout-of-bounds read.\n\nEach I2C data report ID (0xD0 through 0xDE) defines a different\nreport size in the HID descriptor, so the available payload varies\nper report. Validate against the actual received report size rather\nthan a fixed maximum to avoid breaking valid short transfers.\n\nReported-by: Sebastián Josué Alba Vives <sebasjosue84@gmail.com>\nSigned-off-by: Michael Zaidman <michael.zaidman@gmail.com>\n---\nTested on FT260 with I2C-attached EEPROM (24c02) behind PCA9548\nmux switches. Verified short reads (1-4 bytes, report ID 0xD0)\nand multi-report reads with debug tracing enabled, confirming\nxfer->length is correctly validated against the HID report size\nfor each report ID.\n---\n drivers/hid/hid-ft260.c | 11 +++++++++--\n 1 file changed, 9 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c\nindex 333341e80b0e..b31c43353249 100644\n--- a/drivers/hid/hid-ft260.c\n+++ b/drivers/hid/hid-ft260.c\n@@ -1070,8 +1070,15 @@ static int ft260_raw_event(struct hid_device *hdev, struct hid_report *report,\n \n \tif (xfer->report >= FT260_I2C_REPORT_MIN &&\n \t    xfer->report <= FT260_I2C_REPORT_MAX) {\n-\t\tft260_dbg(\"i2c resp: rep %#02x len %d\\n\", xfer->report,\n-\t\t\t  xfer->length);\n+\t\tft260_dbg(\"i2c resp: rep %#02x len %d size %d\\n\",\n+\t\t\t  xfer->report, xfer->length, size);\n+\n+\t\tif (xfer->length > size -\n+\t\t    offsetof(struct ft260_i2c_input_report, data)) {\n+\t\t\thid_err(hdev, \"report %#02x: length %d exceeds HID report size\\n\",\n+\t\t\t\txfer->report, xfer->length);\n+\t\t\treturn -1;\n+\t\t}\n \n \t\tif ((dev->read_buf == NULL) ||\n \t\t    (xfer->length > dev->read_len - dev->read_idx)) {\n",
    "prefixes": []
}