From nobody Tue Jun 9 00:58:51 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5FC12FE060 for ; Sun, 24 May 2026 23:40:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779666058; cv=none; b=srCA4QJn7VCQMxUNIMOK/KkjN/jKjU4HNb4L/nvzhD7XVgX4GcnUpnHKZNd9CaisjDGN9fgpfwoXpeAXEmCPN+sQuDGiJKEOSjpcePOsHwTQzIxLUhAWAuW/RvB4HuPMU4/n8kqAinD7pp7W/WX4jFLPaIlItx7VieCbi45gt6Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779666058; c=relaxed/simple; bh=Awm+pE4tdlxs+ZyrYR9BGcH1F/Gegs+gkpgcf6e0Hn4=; h=Date:From:To:Cc:Subject:Message-Id:Mime-Version:Content-Type; b=F9Lp2Q+cm256XYZPSSakQmHrG6NGcmXl7XOsQYqmKCtZTXiSV9VQVvKJ5qwB7BnVAUC7MQB/3rLoeqyYssHlOnBUMHV5/cbVJ+WEXRw7eJ81Nx5cwcnIGse1SuDCxV9x6KUByh4mAYUURMyKPIHHfBeqibmvXwpt1akfVW/xLR4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aY4yNt+B; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aY4yNt+B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C33D41F000E9; Sun, 24 May 2026 23:40:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779666057; bh=ZNtv6sKMUb+gHKhLes5it4PzqLNrZiQttNVp8uyCYhM=; h=Date:From:To:Cc:Subject; b=aY4yNt+BX6r5cVdYkLCUU2FwocOCStrj1IDXs3cfCDiOpWH0z6OtLsgPxEr/OvjxP Aa9Bd2heIt4b4Au5kN+6pAv56UHLgKVyfU0BHVEJVRTIW3DeE/wURNNRV0rQdKbm7j o8E4bdOcZC8c7pQXwqWElreJ+OOJzMMdDXXdKI6fAfd+uQ+wIPzoOhAWH6X05IdGsb rnCVf1zBD/PAfIm2F9d9fhAQFYf3MSZzeA6OWriiyQNFeYB6aNf6xs7syyMIyu4jwf UxlxaVNW0e936dNJBYSxcU+RJEyUGD9/QkUPtUIJhx3jPgQkW/m8/CgmYhmKtR9xCs ejjQOR+YdPjxw== Date: Mon, 25 May 2026 08:40:53 +0900 From: Masami Hiramatsu (Google) To: Linus Torvalds Cc: Hongtao Lee , Steven Rostedt , Masami Hiramatsu , linux-kernel@vger.kernel.org Subject: [GIT PULL] bootconfig: Fixes for v7.1-rc4 Message-Id: <20260525084053.cccd8df734ae9d866b33d079@kernel.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Linus, Bootconfig fixes for v7.1-rc4 - tools/bootconfig: Fix buf leaks in apply_xbc If data memory allocation failed, free the buf before return. Please pull the latest bootconfig-fixes-v7.1-rc4 tree, which can be found a= t: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git bootconfig-fixes-v7.1-rc4 Tag SHA1: 0223343010ff4dac13d2edf58f0af3efffc34446 Head SHA1: f42d01aadcedd7bbf4f9a466cabe25c1781dedad Hongtao Lee (1): tools/bootconfig: Fix buf leaks in apply_xbc ---- tools/bootconfig/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --------------------------- commit f42d01aadcedd7bbf4f9a466cabe25c1781dedad Author: Hongtao Lee Date: Wed May 20 11:01:26 2026 +0800 tools/bootconfig: Fix buf leaks in apply_xbc =20 If data calloc failed, free the buf before return. =20 Link: https://lore.kernel.org/all/20260520030126.147782-1-lihongtao@kyl= inos.cn/ =20 Fixes: 950313ebf79c ("tools: bootconfig: Add bootconfig command") Signed-off-by: Hongtao Lee Signed-off-by: Masami Hiramatsu (Google) diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c index 643f707b8f1d..ddabde20585f 100644 --- a/tools/bootconfig/main.c +++ b/tools/bootconfig/main.c @@ -390,8 +390,10 @@ static int apply_xbc(const char *path, const char *xbc= _path) =20 /* Backup the bootconfig data */ data =3D calloc(size + BOOTCONFIG_ALIGN + BOOTCONFIG_FOOTER_SIZE, 1); - if (!data) + if (!data) { + free(buf); return -ENOMEM; + } memcpy(data, buf, size); =20 /* Check the data format */ --=20 Masami Hiramatsu (Google)