{"id":2198282,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2198282/?format=json","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.0/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<20260219184400.257008-2-vincent.stehle@arm.com>","date":"2026-02-19T18:43:56","name":"[1/5] efi_selftest: fix buffer overflow","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"dce268d5bac81bc0c3e1bf5e6443e0557e20942f","submitter":{"id":77169,"url":"http://patchwork.ozlabs.org/api/1.0/people/77169/?format=json","name":"Vincent Stehlé","email":"vincent.stehle@arm.com"},"delegate":{"id":68728,"url":"http://patchwork.ozlabs.org/api/1.0/users/68728/?format=json","username":"xypron","first_name":"Heinrich","last_name":"Schuchardt","email":"xypron.glpk@gmx.de"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20260219184400.257008-2-vincent.stehle@arm.com/mbox/","series":[{"id":492712,"url":"http://patchwork.ozlabs.org/api/1.0/series/492712/?format=json","date":"2026-02-19T18:43:55","name":"efi_selftest: manageprotocols fixes and enhancements","version":1,"mbox":"http://patchwork.ozlabs.org/series/492712/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2198282/checks/","tags":{},"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=fail (p=none dis=none) header.from=arm.com","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n dmarc=fail (p=none dis=none) header.from=arm.com","phobos.denx.de;\n spf=pass smtp.mailfrom=vincent.stehle@arm.com"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fH2Nf2sGLz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 20 Feb 2026 05:44:34 +1100 (AEDT)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 95E8383D77;\n\tThu, 19 Feb 2026 19:44:31 +0100 (CET)","by phobos.denx.de (Postfix, from userid 109)\n id 8A4A583D5D; Thu, 19 Feb 2026 19:44:29 +0100 (CET)","from foss.arm.com (foss.arm.com [217.140.110.172])\n by phobos.denx.de (Postfix) with ESMTP id 8002F83D0F\n for <u-boot@lists.denx.de>; Thu, 19 Feb 2026 19:44:27 +0100 (CET)","from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 63586339;\n Thu, 19 Feb 2026 10:44:20 -0800 (PST)","from debian (unknown [10.57.12.78])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7EC403F62B;\n Thu, 19 Feb 2026 10:44:25 -0800 (PST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-1.9 required=5.0 tests=BAYES_00,\n RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,\n RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","From":"=?utf-8?q?Vincent_Stehl=C3=A9?= <vincent.stehle@arm.com>","To":"u-boot@lists.denx.de","Cc":"=?utf-8?q?Vincent_Stehl=C3=A9?= <vincent.stehle@arm.com>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>, Tom Rini <trini@konsulko.com>","Subject":"[PATCH 1/5] efi_selftest: fix buffer overflow","Date":"Thu, 19 Feb 2026 19:43:56 +0100","Message-ID":"<20260219184400.257008-2-vincent.stehle@arm.com>","X-Mailer":"git-send-email 2.51.0","In-Reply-To":"<20260219184400.257008-1-vincent.stehle@arm.com>","References":"<20260219184400.257008-1-vincent.stehle@arm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"},"content":"The test of the UEFI LocateHandleBuffer() function clears a returned buffer\nat some point to reuse it, but there is an error in the size computation,\nwhich leads to a buffer overflow; fix it.\n\nFixes: 927ca890b09f (\"efi_selftest: test protocol management\")\nSigned-off-by: Vincent Stehlé <vincent.stehle@arm.com>\nCc: Heinrich Schuchardt <xypron.glpk@gmx.de>\nCc: Ilias Apalodimas <ilias.apalodimas@linaro.org>\nCc: Tom Rini <trini@konsulko.com>\n---\n lib/efi_selftest/efi_selftest_manageprotocols.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/lib/efi_selftest/efi_selftest_manageprotocols.c b/lib/efi_selftest/efi_selftest_manageprotocols.c\nindex 097b2ae3545..ccffa59095d 100644\n--- a/lib/efi_selftest/efi_selftest_manageprotocols.c\n+++ b/lib/efi_selftest/efi_selftest_manageprotocols.c\n@@ -241,7 +241,7 @@ static int execute(void)\n \t\treturn EFI_ST_FAILURE;\n \t}\n \t/* Clear the buffer, we are reusing it it the next step. */\n-\tboottime->set_mem(buffer, sizeof(efi_handle_t) * buffer_size, 0);\n+\tboottime->set_mem(buffer, sizeof(efi_handle_t) * count, 0);\n \n \t/*\n \t * Test LocateHandle with ByProtocol\n","prefixes":["1/5"]}