Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196557/?format=api
{ "id": 2196557, "url": "http://patchwork.ozlabs.org/api/patches/2196557/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/92af570970aadee773f2b0b18179efef0f34be93.1771114891.git.fthain@linux-m68k.org/", "project": { "id": 3, "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api", "name": "Linux MTD development", "link_name": "linux-mtd", "list_id": "linux-mtd.lists.infradead.org", "list_email": "linux-mtd@lists.infradead.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<92af570970aadee773f2b0b18179efef0f34be93.1771114891.git.fthain@linux-m68k.org>", "list_archive_url": null, "date": "2026-02-15T00:21:31", "name": "mtd: Avoid boot crash in RedBoot partition table parser", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1bc08c7d3d5017940b6f55d850f5c52bd026950f", "submitter": { "id": 81812, "url": "http://patchwork.ozlabs.org/api/people/81812/?format=api", "name": "Finn Thain", "email": "fthain@linux-m68k.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/92af570970aadee773f2b0b18179efef0f34be93.1771114891.git.fthain@linux-m68k.org/mbox/", "series": [ { "id": 492198, "url": "http://patchwork.ozlabs.org/api/series/492198/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=492198", "date": "2026-02-15T00:21:31", "name": "mtd: Avoid boot crash in RedBoot partition table parser", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492198/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196557/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196557/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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 secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mC3OuL3Q;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=messagingengine.com header.i=@messagingengine.com\n header.a=rsa-sha256 header.s=fm3 header.b=fAzw/vJo;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\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 4fD68D1VG9z1xwj\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 15 Feb 2026 11:23:34 +1100 (AEDT)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vrPul-000000052ye-0898;\n\tSun, 15 Feb 2026 00:23:07 +0000", "from fhigh-b7-smtp.messagingengine.com ([202.12.124.158])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vrPuf-000000052xx-1Um4\n\tfor linux-mtd@lists.infradead.org;\n\tSun, 15 Feb 2026 00:23:03 +0000", "from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43])\n\tby mailfhigh.stl.internal (Postfix) with ESMTP id EEA6F7A0010;\n\tSat, 14 Feb 2026 19:22:55 -0500 (EST)", "from phl-frontend-04 ([10.202.2.163])\n by phl-compute-03.internal (MEProxy); Sat, 14 Feb 2026 19:22:56 -0500", "by mail.messagingengine.com (Postfix) with ESMTPA; Sat,\n 14 Feb 2026 19:22:53 -0500 (EST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help:\n\tList-Post:List-Archive:List-Unsubscribe:List-Id:Date:Subject:From:Message-ID:\n\tCc:To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=vYmlppmc38aBfHuVJ38/B/YUxe3yZpYifSiD4uU9rCQ=; b=mC3OuL3QLkFLw9\n\tOMrL2wWJgBV3h6sLLJhtfUzE1F1Jt5Naogmq31gT4SihEBZ88CdEmQA5tG8TNKlijEtLAtAhzQCnn\n\t6AUz13T1z0zSE5vhOZqmbHuO27kt/OkFEyxut0mFSoayJcihjMx2oKWJIDG0AxlpAhCaOov4FOS7V\n\tJZUfBVqpO9aq99Bqk5fytpypP9BbzSYqjzryf0y185v276wnomr7Dr/HyK2XZKFxh2H9mCNyaQZg5\n\t/jRevCGa9RUyn91tL2UbqlaaXJBUCbuLV7y/kc9sBFgDQvPvfHRClXhn2dPQt5c1qj35PG+mJYKmy\n\tFp5nHAAPgs3jNBKTatCA==;", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:cc:content-type:date:date:feedback-id\n\t:feedback-id:from:from:in-reply-to:message-id:reply-to:subject\n\t:subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n\tfm3; t=1771114975; x=1771201375; bh=hc2F8xxBgw9KFLMT7GGYPqWvc2/v\n\tLKLhR9u451GcYGM=; b=fAzw/vJoD4OA++mzSv7rPKdhnwXiJFxFF8L1eN2Lnsdp\n\t8dsGqWc/v5Iny/jI+26i/HYJIVmk5QIDNGp8wjvDNSlCayGxAb/433cq06R6xVC8\n\tzpVFirCnEOeXk89Cd2KiS+eCjCPsK6frOKVx/hLb/aKmQDt7/eewhAQYQFZNPOCf\n\tT+Wa+cT7OyHAD9ZvIsYO5fquQVPcWsoflpy2mf5YsXCN0T18QUshBD/o5r9HEcKD\n\t93Mtde2G+1JTdYeOSjfmTlgyCUfeKHgHt+FNBQzSMhnioSLdMgc8oH1jV/9KfiGj\n\tbKDVQBH2ABn1FtRO4rw7SFnSqrYl3Manie1Z2D8J1A==" ], "X-ME-Sender": "<xms:3hGRaRFBSZ-wixRZ882PFQBCq2seclqI1OwLrLEFrBn-QN8M7LTf5A>\n <xme:3hGRaS7hHdQ99m5LFmr7hxVm8vtf2aLv52B7DbfklWFfxVvOTEpa5j4eHuw6mZ_CM\n EaE6WuCm7wM_hnqmEXlS51YnHjriSOmfUkbQ9UHTK3sXYdiZSXaG74>", "X-ME-Received": "\n <xmr:3hGRaXltFhfl8XPh2kMrmcBs_-93fWCVLJPVDy5dwIgtlpYHP-hJBHLJjsQK>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvuddvheegucetufdoteggodetrf\n dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu\n rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf\n gurhepvfevkffhufffsedttdertddttddtnecuhfhrohhmpefhihhnnhcuvfhhrghinhcu\n oehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtthgvrhhnpe\n ehfffggeefveegvedtiefffeevuedtgefhueehieetffejfefggeevfeeuvdduleenucev\n lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfthhhrghinh\n eslhhinhhugidqmheikehkrdhorhhgpdhnsggprhgtphhtthhopeelpdhmohguvgepshhm\n thhpohhuthdprhgtphhtthhopehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrd\n gtohhmpdhrtghpthhtoheprhhitghhrghrugesnhhougdrrghtpdhrtghpthhtohepvhhi\n ghhnvghshhhrsehtihdrtghomhdprhgtphhtthhopehojhgvuggrsehkvghrnhgvlhdroh\n hrghdprhgtphhtthhopehkvggvsheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepshht\n rggslhgvsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqhh\n grrhguvghnihhnghesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhn\n uhigqdhmthgusehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdhrtghpthhtoheplh\n hinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg", "X-ME-Proxy": "<xmx:3hGRad5T6ATE_vJgdFk5xWyKGWNArPEh3uG-VxlbzGzXHQBrgMJrUg>\n <xmx:3hGRaYQBCwOjV2BkMkwFfAROFHD_LTYiyvZ7sO69rVRcueGOomu-sg>\n <xmx:3hGRaby0vuUEW5XKErtaLXaxmE82IPweYfpI-MLPDCYgK6yxjzsfdw>\n <xmx:3hGRaQpFpGG7GUnYK-oOTPa_ewvSwIusT5iIAeCYQRRmFRm-4Yr8oA>\n <xmx:3xGRad8IAf8GkErZGecpHHYgVU64nmYTMllA1M_rYIj9p3VzcKTMgAGL>", "Feedback-ID": "i58a146ae:Fastmail", "To": "Miquel Raynal <miquel.raynal@bootlin.com>,\n Richard Weinberger <richard@nod.at>,\n Vignesh Raghavendra <vigneshr@ti.com>,\n Miguel Ojeda <ojeda@kernel.org>,\n Kees Cook <kees@kernel.org>", "Cc": "stable@vger.kernel.org,\n linux-hardening@vger.kernel.org,\n linux-mtd@lists.infradead.org,\n linux-kernel@vger.kernel.org", "Message-ID": "\n <92af570970aadee773f2b0b18179efef0f34be93.1771114891.git.fthain@linux-m68k.org>", "From": "Finn Thain <fthain@linux-m68k.org>", "Subject": "[PATCH] mtd: Avoid boot crash in RedBoot partition table parser", "Date": "Sun, 15 Feb 2026 11:21:31 +1100", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260214_162301_440078_B4BAEBE0 ", "X-CRM114-Status": "GOOD ( 12.48 )", "X-Spam-Score": "-2.6 (--)", "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n the administrator of that system for details.\n Content preview: Given CONFIG_FORTIFY_SOURCE=y, and given a recent compiler,\n commit 439a1bcac648 (\"fortify: Use __builtin_dynamic_object_size() when\n available\")\n produces the warning below and an oops. Searching for RedBoot partition\n table\n in 50000000.flash at offset 0x7e0000 [ cut here ] WARNING:\n lib/string_helpers.c:1035\n at 0xc029e04c, CPU#0: swapper/0/1 memcmp: detected b [...]\n Content analysis details: (-2.6 points, 5.0 required)\n pts rule name description\n ---- ----------------------\n --------------------------------------------------\n -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low\n trust\n [202.12.124.158 listed in list.dnswl.org]\n 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n query to Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [202.12.124.158 listed in\n sa-trusted.bondedsender.org]\n 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [202.12.124.158 listed in sa-accredit.habeas.com]\n 0.0 SPF_NONE SPF: sender does not publish an SPF Record\n 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [202.12.124.158 listed in\n bl.score.senderscore.com]\n -0.0 SPF_HELO_PASS SPF: HELO matches SPF record\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n [score: 0.0000]", "X-BeenThere": "linux-mtd@lists.infradead.org", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>", "List-Post": "<mailto:linux-mtd@lists.infradead.org>", "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>", "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "Given CONFIG_FORTIFY_SOURCE=y, and given a recent compiler,\ncommit 439a1bcac648 (\"fortify: Use __builtin_dynamic_object_size() when\navailable\") produces the warning below and an oops.\n\n Searching for RedBoot partition table in 50000000.flash at offset 0x7e0000\n ------------[ cut here ]------------\n WARNING: lib/string_helpers.c:1035 at 0xc029e04c, CPU#0: swapper/0/1\n memcmp: detected buffer overflow: 15 byte read of buffer size 14\n Modules linked in:\n CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.19.0 #1 NONE\n\nI couldn't see how memcmp() exceeds the buffer here, so the simplest way\nto prevent the regression was to perform memcmp() on the original name\nrather than the copy.\n\nCc: stable@vger.kernel.org\nCc: linux-hardening@vger.kernel.org\nFixes: 439a1bcac648 (\"fortify: Use __builtin_dynamic_object_size() when available\")\nSigned-off-by: Finn Thain <fthain@linux-m68k.org>\n---\nI put commit 439a1bcac648 into a Fixes tag because git bisect identified\nthat commit as the source of the regression. But I don't know anything\nabout __builtin_dynamic_object_size() or its limitations. So perhaps the\nreal bug lies elsewhere. The compiler I'm using is this one:\n\n$ armeb-softfloat-linux-musleabi-gcc --version\narmeb-softfloat-linux-musleabi-gcc (Gentoo Hardened 13.4.1_p20250807 p8) 13.4.1 20250807\n---\n drivers/mtd/parsers/redboot.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/mtd/parsers/redboot.c b/drivers/mtd/parsers/redboot.c\nindex 3b55b676ca6b..6e253f6c45c9 100644\n--- a/drivers/mtd/parsers/redboot.c\n+++ b/drivers/mtd/parsers/redboot.c\n@@ -269,14 +269,14 @@ static int parse_redboot_partitions(struct mtd_info *master,\n \t\tparts[i].name = names;\n \n \t\tstrcpy(names, fl->img->name);\n+\t\tnames += strlen(names) + 1;\n+\n #ifdef CONFIG_MTD_REDBOOT_PARTS_READONLY\n-\t\tif (!memcmp(names, \"RedBoot\", 8) ||\n-\t\t !memcmp(names, \"RedBoot config\", 15) ||\n-\t\t !memcmp(names, \"FIS directory\", 14)) {\n+\t\tif (!memcmp(fl->img->name, \"RedBoot\", 8) ||\n+\t\t !memcmp(fl->img->name, \"RedBoot config\", 15) ||\n+\t\t !memcmp(fl->img->name, \"FIS directory\", 14))\n \t\t\tparts[i].mask_flags = MTD_WRITEABLE;\n-\t\t}\n #endif\n-\t\tnames += strlen(names) + 1;\n \n #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED\n \t\tif (fl->next && fl->img->flash_base + fl->img->size + master->erasesize <= fl->next->img->flash_base) {\n", "prefixes": [] }