Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217363/?format=api
{ "id": 2217363, "url": "http://patchwork.ozlabs.org/api/patches/2217363/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260328060139.63221-2-S4210155@student.rmit.edu.au/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "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, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260328060139.63221-2-S4210155@student.rmit.edu.au>", "list_archive_url": null, "date": "2026-03-28T06:01:32", "name": "[2/3] board: toradex: fix tdx-cfg-block prompt buffer overflow", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0183374bceaa1c5812fae3ff40ec6fd1052336f9", "submitter": { "id": 92995, "url": "http://patchwork.ozlabs.org/api/people/92995/?format=api", "name": "Ngo Luong Thanh Tra", "email": "ngotra27101996@gmail.com" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260328060139.63221-2-S4210155@student.rmit.edu.au/mbox/", "series": [ { "id": 497853, "url": "http://patchwork.ozlabs.org/api/series/497853/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=497853", "date": "2026-03-28T06:01:31", "name": "[1/3] board: samsung: fix set_board_info() board_name buffer overflow", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497853/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217363/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217363/checks/", "tags": {}, "related": [], "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\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=mEaeWeri;\n\tdkim-atps=neutral", "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=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.b=\"mEaeWeri\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=ngotra27101996@gmail.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 4fjT7X4qchz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 18:06:00 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 40ECD83F14;\n\tSat, 28 Mar 2026 08:05:43 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id E887283C14; Sat, 28 Mar 2026 07:01:54 +0100 (CET)", "from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com\n [IPv6:2607:f8b0:4864:20::52f])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id AB1BB8394E\n for <u-boot@lists.denx.de>; Sat, 28 Mar 2026 07:01:52 +0100 (CET)", "by mail-pg1-x52f.google.com with SMTP id\n 41be03b00d2f7-c763c294cccso1916003a12.1\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 23:01:52 -0700 (PDT)", "from localhost.localdomain ([171.244.188.41])\n by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c76916d26dbsm902635a12.13.2026.03.27.23.01.48\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Fri, 27 Mar 2026 23:01:50 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD,\n FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774677711; x=1775282511; darn=lists.denx.de;\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=u3rWUha5tdrdUYusGsLO/bnQLFbcmmdnYjkADhLg/p0=;\n b=mEaeWeriIHzG09ezGVTlqmrUhSXuGZTA4tAoNpHlpki+cpeeGcF8jLXkJYCsfJMe2s\n 4YFtU4ldZslqMqwYAKGJaEUEEhsXhMy3Ko7LL2URchGivNlLOf7E01A6ptkjam5xJ+vb\n S+Pu2i8mq3YZ95pcrqBm2zK9Z1LFOxUB5uppk8Vm/hvc9YOESTlFPuPEcQLRijIwBpNa\n 3nXCGNqqN/39RwEG0aaunwCNuDfg0YKh19QG7zdBe4VAGh4iGsN0zEwxC56umAuhpR1S\n 7GTaF/PH9fY8FmyD/kGZNBJ1h6j6X82XuA1KOrCtHhUrbm37KpL82bLYBKa4A3MzKGnn\n 1p6Q==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774677711; x=1775282511;\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=u3rWUha5tdrdUYusGsLO/bnQLFbcmmdnYjkADhLg/p0=;\n b=o+XpJ0o1CI2NZ0NhzV3QDN7767Wpu1z4CI3hkvmACwAgPBxbfNsuBOP2BwCY5mGJHR\n mGh+w1fdbp0aNQXTgRIOuIC6/NXnWk2xlNzWki5w/N8ivHqf/SR9YIjHcgRCxildB9rc\n pL0P5Kku1VbZS4bU6MmWGUAdN0JsgikkjDtpepEpq5uw5qeAKNNbhQBgbTBgbgrqGmps\n VwkfBTw6bjAfpxahUV5JWM8+DHiU0ykggHDGSGHI0NF4XF5Oik1xYm5qg1lmcsROUZBB\n hF+I0kGYjXF6GhRnBvy6aSnyFw1D8xgdGxKB8/qtTklArdmvFFdizYUo3qeW4IiuDv5n\n kN7g==", "X-Gm-Message-State": "AOJu0YwdF649fzr5l8Om9PMfthYwQ5CgLHqRTqOOr13xFP05L8/410uJ\n d8PWNe3a9ihStnjuMfBM8ZNPZzPezaz63xRB4w3cLWJhLf3OE9f8NhPStM+QFhpz", "X-Gm-Gg": "ATEYQzwekS7KynzYb1WLnqKsr7sWt0aPrmDWQcO/fMjj+f3Obu8DHbybGcxLKHCj+I0\n BOQ35vxUlzNWI47LRH2xiy8ItxKPwSl7BzGeW8khVFWGFlEr8xT/tseZHdMYX+QeZaQo2T5vo+D\n JFnn26b7YxvikrH1kTfkG8jrz0y/c1KqImNH91v6bQ7XfV87LvMZtSjaUjSxb37V+huUkP9MCrE\n p7bEbwpygI6kO9J59nEfa0AIxd279juqftsL1iBT9aAfw8QmpVRHs8SkDcYifdNtEh30Ia3RQ8L\n X9Q8HiVEZK6TlydzONk3K3RN9NcP7+mz7wTxxQ+/5N3a4XecDc/fh4ZrbzM0vGvng3X2/3UniLe\n XICim5IVhZu134PW4vdOXPdpu/HBojBiFiuIXoJLylmz4ykxK7k3eamK9GJ+BdzPY1kjVRlHRAA\n 2Qg7FER3fsn2+c9A7szaUEudXGzp2TtmLAwbsqAipcKUKyJIkEFacfd0/BvLzP41JRysi/SiAvx\n A==", "X-Received": "by 2002:a05:6a20:7352:b0:39c:39d1:dbf4 with SMTP id\n adf61e73a8af0-39c87bed5a0mr5436002637.46.1774677710845;\n Fri, 27 Mar 2026 23:01:50 -0700 (PDT)", "From": "Ngo Luong Thanh Tra <ngotra27101996@gmail.com>", "X-Google-Original-From": "Ngo Luong Thanh Tra <S4210155@student.rmit.edu.au>", "To": "u-boot@lists.denx.de", "Cc": "Ngo Luong Thanh Tra <S4210155@student.rmit.edu.au>,\n Emanuele Ghidoli <emanuele.ghidoli@toradex.com>,\n Francesco Dolcini <francesco.dolcini@toradex.com>,\n Tom Rini <trini@konsulko.com>, Vitor Soares <vitor.soares@toradex.com>", "Subject": "[PATCH 2/3] board: toradex: fix tdx-cfg-block prompt buffer overflow", "Date": "Sat, 28 Mar 2026 13:01:32 +0700", "Message-ID": "<20260328060139.63221-2-S4210155@student.rmit.edu.au>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260328060139.63221-1-S4210155@student.rmit.edu.au>", "References": "<20260328060139.63221-1-S4210155@student.rmit.edu.au>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Mailman-Approved-At": "Sat, 28 Mar 2026 08:05:42 +0100", "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": "Replace unbounded sprintf() with snprintf() using sizeof(message)\nas the bound for all prompt string assignments in\nget_cfgblock_interactive(), get_cfgblock_carrier_interactive(),\ndo_cfgblock_carrier_create() and do_cfgblock_create(). The\nprevious calls had no size limit and could overflow the\nCONFIG_SYS_CBSIZE-sized stack buffer if SYS_CBSIZE was configured\nsmaller than the longest prompt string (71 bytes).\n\nFixes: 8b6dc5d3943c (\"toradex: tdx-cfg-block: Cleanup interactive cfg block creation\")\nSigned-off-by: Ngo Luong Thanh Tra <S4210155@student.rmit.edu.au>\nTo: u-boot@lists.denx.de\n---\n\n board/toradex/common/tdx-cfg-block.c | 21 ++++++++++++---------\n 1 file changed, 12 insertions(+), 9 deletions(-)", "diff": "diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c\nindex 0fc3759695f..d75a6754c68 100644\n--- a/board/toradex/common/tdx-cfg-block.c\n+++ b/board/toradex/common/tdx-cfg-block.c\n@@ -508,7 +508,7 @@ static int get_cfgblock_interactive(void)\n \t\t\t toradex_modules[i].name);\n \t}\n \n-\tsprintf(message, \"Enter the module ID: \");\n+\tsnprintf(message, sizeof(message), \"Enter the module ID: \");\n \tlen = cli_readline(message);\n \n \tprodid = dectoul(console_buffer, NULL);\n@@ -521,7 +521,8 @@ static int get_cfgblock_interactive(void)\n \n \tlen = 0;\n \twhile (len < 4) {\n-\t\tsprintf(message, \"Enter the module version (e.g. V1.1B or V1.1#26): V\");\n+\t\tsnprintf(message, sizeof(message),\n+\t\t\t \"Enter the module version (e.g. V1.1B or V1.1#26): V\");\n \t\tlen = cli_readline(message);\n \t}\n \n@@ -535,7 +536,7 @@ static int get_cfgblock_interactive(void)\n \t}\n \n \twhile (len < 8) {\n-\t\tsprintf(message, \"Enter module serial number: \");\n+\t\tsnprintf(message, sizeof(message), \"Enter module serial number: \");\n \t\tlen = cli_readline(message);\n \t}\n \n@@ -744,12 +745,13 @@ static int get_cfgblock_carrier_interactive(void)\n \t\t toradex_carrier_boards[i].name,\n \t\t toradex_carrier_boards[i].pid4);\n \n-\tsprintf(message, \"Choose your carrier board (provide ID): \");\n+\tsnprintf(message, sizeof(message), \"Choose your carrier board (provide ID): \");\n \tlen = cli_readline(message);\n \ttdx_car_hw_tag.prodid = dectoul(console_buffer, NULL);\n \n \tdo {\n-\t\tsprintf(message, \"Enter carrier board version (e.g. V1.1B or V1.1#26): V\");\n+\t\tsnprintf(message, sizeof(message),\n+\t\t\t \"Enter carrier board version (e.g. V1.1B or V1.1#26): V\");\n \t\tlen = cli_readline(message);\n \t} while (len < 4);\n \n@@ -763,7 +765,7 @@ static int get_cfgblock_carrier_interactive(void)\n \t}\n \n \twhile (len < 8) {\n-\t\tsprintf(message, \"Enter carrier board serial number: \");\n+\t\tsnprintf(message, sizeof(message), \"Enter carrier board serial number: \");\n \t\tlen = cli_readline(message);\n \t}\n \n@@ -799,7 +801,8 @@ static int do_cfgblock_carrier_create(struct cmd_tbl *cmdtp, int flag, int argc,\n \tif (valid_cfgblock_carrier && !force_overwrite) {\n \t\tchar message[CONFIG_SYS_CBSIZE];\n \n-\t\tsprintf(message, \"A valid Toradex Carrier config block is present, still recreate? [y/N] \");\n+\t\tsnprintf(message, sizeof(message),\n+\t\t\t \"A valid Toradex Carrier config block is present, still recreate? [y/N] \");\n \n \t\tif (!cli_readline(message))\n \t\t\tgoto out;\n@@ -907,8 +910,8 @@ static int do_cfgblock_create(struct cmd_tbl *cmdtp, int flag, int argc,\n \t\tif (!force_overwrite) {\n \t\t\tchar message[CONFIG_SYS_CBSIZE];\n \n-\t\t\tsprintf(message,\n-\t\t\t\t\"A valid Toradex config block is present, still recreate? [y/N] \");\n+\t\t\tsnprintf(message, sizeof(message),\n+\t\t\t\t \"A valid Toradex config block is present, still recreate? [y/N] \");\n \n \t\t\tif (!cli_readline(message))\n \t\t\t\tgoto out;\n", "prefixes": [ "2/3" ] }