From: Pratyush Yadav <pratyush@kernel.org>
To: Tao Liu <ltao@redhat.com>
Cc: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
alex@ghiti.fr, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
bhe@redhat.com
Subject: Re: [PATCH v2] riscv: Fix a NULL pointer reference in machine_kexec_prepare
Date: Mon, 29 Jun 2026 13:13:24 +0200 [thread overview]
Message-ID: <2vxzcxx9k3aj.fsf@kernel.org> (raw)
In-Reply-To: <20260627222602.23594-2-ltao@redhat.com> (Tao Liu's message of "Sun, 28 Jun 2026 10:26:03 +1200")
On Sun, Jun 28 2026, Tao Liu wrote:
> A NULL pointer reference issue is noticed in riscv's machine_kexec_prepare,
> where image->segment[i].buf might be NULL and copied unchecked.
>
> The NULL buf comes from security/integrity/ima/ima_kexec.c:
> ima_add_kexec_buffer(), where kbuf is added by kexec_add_buffer(),
> but kbuf.buffer is NULL.
>
> Fix this by simply adding a check before copy.
>
> Acked-by: Baoquan He <bhe@redhat.com>
> Signed-off-by: Tao Liu <ltao@redhat.com>
Acked-by: Pratyush Yadav <pratyush@kernel.org>
[...]
--
Regards,
Pratyush Yadav
WARNING: multiple messages have this Message-ID (diff)
From: Pratyush Yadav <pratyush@kernel.org>
To: Tao Liu <ltao@redhat.com>
Cc: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
alex@ghiti.fr, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
bhe@redhat.com
Subject: Re: [PATCH v2] riscv: Fix a NULL pointer reference in machine_kexec_prepare
Date: Mon, 29 Jun 2026 13:13:24 +0200 [thread overview]
Message-ID: <2vxzcxx9k3aj.fsf@kernel.org> (raw)
In-Reply-To: <20260627222602.23594-2-ltao@redhat.com> (Tao Liu's message of "Sun, 28 Jun 2026 10:26:03 +1200")
On Sun, Jun 28 2026, Tao Liu wrote:
> A NULL pointer reference issue is noticed in riscv's machine_kexec_prepare,
> where image->segment[i].buf might be NULL and copied unchecked.
>
> The NULL buf comes from security/integrity/ima/ima_kexec.c:
> ima_add_kexec_buffer(), where kbuf is added by kexec_add_buffer(),
> but kbuf.buffer is NULL.
>
> Fix this by simply adding a check before copy.
>
> Acked-by: Baoquan He <bhe@redhat.com>
> Signed-off-by: Tao Liu <ltao@redhat.com>
Acked-by: Pratyush Yadav <pratyush@kernel.org>
[...]
--
Regards,
Pratyush Yadav
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-06-29 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-27 22:26 [PATCH v2] riscv: Fix a NULL pointer reference in machine_kexec_prepare Tao Liu
2026-06-27 22:26 ` Tao Liu
2026-06-29 11:13 ` Pratyush Yadav [this message]
2026-06-29 11:13 ` Pratyush Yadav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2vxzcxx9k3aj.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=bhe@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=ltao@redhat.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.