Thread (29 messages) 29 messages, 2 authors, 6d ago

Re: [PATCH v6 08/14] LoongArch: kexec_file: Fix a modified_cmdline leak

From: sashiko-bot@kernel.org
Date: 2026-09-21 09:16:01
Also in: driver-core, kexec, lkml, loongarch

load_other_segments() allocates modified_cmdline and stores it in
image->arch.cmdline_ptr.  machine_kexec_prepare() then copies it to
KEXEC_CMDLINE_ADDR and overwrites the pointer, so the heap buffer is
leaked on every successful kexec_file_load().

Free the buffer after the copy.

Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: Kexin Liu <redacted>
Cc: Youling Tang <redacted>
Cc: Qiang Ma <redacted>
Cc: Tianyang Zhang <redacted>
Cc: George Guo <redacted>
Cc: stable@vger.kernel.org
Fixes: d162feec6b6e ("LoongArch: Add preparatory infrastructure for kexec_file")
Signed-off-by: Jinjie Ruan <redacted>
Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260921090450.807575-1-ruanjinjie@huawei.com?part=8

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help