Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217364/?format=api
{ "id": 2217364, "url": "http://patchwork.ozlabs.org/api/patches/2217364/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260328060139.63221-3-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-3-S4210155@student.rmit.edu.au>", "list_archive_url": null, "date": "2026-03-28T06:01:33", "name": "[3/3] common: cli_hush: fix console_buffer overflow on boot retry", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "93c3bddddc9f0ee8bcf11a5d5d49a02a790d13bc", "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-3-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/2217364/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217364/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=CBurOtro;\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=\"CBurOtro\";\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 4fjT7j6CDPz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 18:06:09 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 95B6183FD3;\n\tSat, 28 Mar 2026 08:05:43 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 3375083CD3; Sat, 28 Mar 2026 07:02:12 +0100 (CET)", "from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com\n [IPv6:2607:f8b0:4864:20::52e])\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 0438F8394E\n for <u-boot@lists.denx.de>; Sat, 28 Mar 2026 07:02:10 +0100 (CET)", "by mail-pg1-x52e.google.com with SMTP id\n 41be03b00d2f7-c70e27e2b74so938680a12.0\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 23:02:09 -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.02.06\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Fri, 27 Mar 2026 23:02:07 -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=1774677728; x=1775282528; 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=NcRcN5ldVDZZAn32xO/pNyQnAy8qUflkMh6hUEqageI=;\n b=CBurOtroECVLCHv38sNxF2mH5cCCqO0LDCX9KZbWp0rh9e7M0pb4VtPfBPxJnfexZ8\n Vfyu+lbGbjUe5X0ZgkEGw37WvhNmgHTdlPLuqiAa0SbZhP+UGGrbgaTZKN0sH/ovLrYA\n wWCXsOTsTphmIXXoCQU935q4W+dPubGDp0UJd4cvyEY1pi10CrDk81k8I4lp4vJKzgLg\n LcAFbhREN/Srm7Man331UmzWK6yyagbv0UGySW6RG6xubogEBnDG39rgPujtxZeoT+ok\n LWhNrzrNFoR0ImBXx77WeZpi4vjUjQueG4H4czy9j4vRKF7KSGf0JoZ2ISByRvsN1us5\n Julg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774677728; x=1775282528;\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=NcRcN5ldVDZZAn32xO/pNyQnAy8qUflkMh6hUEqageI=;\n b=EXDnTnAx5vDcwksH8BKG/eknUwHsfIu6xgUGfdOliJAUWbcDAER56pnB6egi/ecaO8\n bT5/vtcKgJJWgpd2Y2rX07NyPyy6HCxDb15GFeJL1pWVEQ6A6dl98hnq2ZR9+tw1NhIS\n w+iXXsGYgo7f53nU7UVTKtUK63Fis7OjfjLhdVLGrFZz0hF2FfBFQqkRg/g5YDD8ZGup\n rIy6+nd4XqeQsqzQtA+s3lN+ZBo9R6dIdYv8buR8WaubETGXS1HvVZYOMEqNqjqzKV4M\n +ZeYya6ZhqqpbRYbg2XSLBBonzWHsmrYoif92CPjP6a5Gl4n8i8Nabf+VAKv/hJOtJmp\n RZww==", "X-Gm-Message-State": "AOJu0YwgDM7wTyrxdlMqNBDgpE8nKgKSOm/Y7Cat1xMKgMyXVPhOUS5y\n p0DmtxKdJc3gGa+0TJHtQnBvBjO4DhZquLdXOYhHKyM7mPemYKD/mtnCTa7WDsSf", "X-Gm-Gg": "ATEYQzxjCZCzBendjYjZcnhcWlnY8wCUqYr+6kbL4tfzhR9VMCHHcFdGqJDLDbPgV4d\n kE9IE2ZVM9Ac1c4HMtWljSVchRHztkUpzXFJJI31STCbx23UufN4lAQwVtai3jDK4pHhB8EHxu+\n JtvJySPifIfPHGtpGJ8TwThTJCzY1SXgmTNRxtuoIqtmQsnbQoXaMQHptyZ/fnnXSJD3IfiJmtf\n 3haK759Py+g6iOQi/wqZsGelNoGVzGAiFWhqMUdxPYK3ck045W9TabQHb+S1jhCd20AXdIOMokN\n Up6mPp244Ko3J43fB+KCUg+9L61nRag1BG6vmdq0qtFuet5P5Kv50CrqJSxqwAaXS75cpZAW+rZ\n gJDCe3mDA9n1ZCOinQFaiksI6H/sO+Y4DbPIHXqF0dt5hM2AsGh8c3Fn1SW1CHbTmnxVxTJv/tp\n J1tcFFE2dxWNI5JPndQhW1Lv3zIKALDZMmtV04HEMLpMT7vGy/6DP/dlSehZvVIR8=", "X-Received": "by 2002:a05:6a20:9143:b0:398:7830:8a40 with SMTP id\n adf61e73a8af0-39c8794f94dmr6127548637.23.1774677728166;\n Fri, 27 Mar 2026 23:02:08 -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 Casey Connolly <casey.connolly@linaro.org>, Tom Rini <trini@konsulko.com>", "Subject": "[PATCH 3/3] common: cli_hush: fix console_buffer overflow on boot\n retry", "Date": "Sat, 28 Mar 2026 13:01:33 +0700", "Message-ID": "<20260328060139.63221-3-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 strcpy() with strlcpy() when injecting the boot retry\ncommand into console_buffer. Add a BUILD_BUG_ON() to catch at\ncompile time any configuration where CONFIG_SYS_CBSIZE is smaller\nthan the retry command string, and use a named constant for the\ncommand so that the size check stays in sync if the string is\never changed.\n\nFixes: 657e19f8f2dd (\"cli_hush: support running bootcmd on boot retry\")\nSigned-off-by: Ngo Luong Thanh Tra <S4210155@student.rmit.edu.au>\nTo: u-boot@lists.denx.de\n---\n\n common/cli_hush.c | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)", "diff": "diff --git a/common/cli_hush.c b/common/cli_hush.c\nindex 7bd6943d3ed..6141c2959df 100644\n--- a/common/cli_hush.c\n+++ b/common/cli_hush.c\n@@ -84,6 +84,7 @@\n #include <cli_hush.h>\n #include <command.h> /* find_cmd */\n #include <asm/global_data.h>\n+#include <linux/build_bug.h>\n #endif\n #ifndef __U_BOOT__\n #include <ctype.h> /* isalpha, isdigit */\n@@ -1029,7 +1030,10 @@ static void get_user_input(struct in_str *i)\n # ifdef CONFIG_RESET_TO_RETRY\n \t do_reset(NULL, 0, 0, NULL);\n # elif IS_ENABLED(CONFIG_RETRY_BOOTCMD)\n-\tstrcpy(console_buffer, \"run bootcmd\\n\");\n+\tstatic const char retry_cmd[] = \"run bootcmd\\n\";\n+\n+\tBUILD_BUG_ON(sizeof(retry_cmd) - 1 > CONFIG_SYS_CBSIZE);\n+\tstrlcpy(console_buffer, retry_cmd, sizeof(console_buffer));\n # else\n #\terror \"This only works with CONFIG_RESET_TO_RETRY or CONFIG_BOOT_RETRY_COMMAND enabled\"\n # endif\n", "prefixes": [ "3/3" ] }