From: Avnish Chouhan <avnish@linux.ibm.com>
To: ssrish@linux.ibm.com
Cc: grub-devel@gnu.org, stefanb@linux.ibm.com,
sudhakar@linux.ibm.com, daniel.kiper@oracle.com,
phcoder@gmail.com, nayna@linux.ibm.com, sridharm@linux.ibm.com
Subject: Re: [PATCH v2] kern: perform NULL check in unregister paths (command/extcmd)
Date: Thu, 11 Sep 2025 12:29:58 +0530 [thread overview]
Message-ID: <453ab099b440e6597b6e7642fe488fc3@linux.ibm.com> (raw)
In-Reply-To: <mailman.870.1757509050.1197.grub-devel@gnu.org>
On 2025-09-10 18:27, grub-devel-request@gnu.org wrote:
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 9 Sep 2025 11:09:55 -0400
> From: Stefan Berger <stefanb@linux.ibm.com>
> To: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>, Srish Srinivasan
> <ssrish@linux.ibm.com>
> Cc: grub-devel@gnu.org, daniel.kiper@oracle.com, phcoder@gmail.com,
> nayna@linux.ibm.com, sridharm@linux.ibm.com
> Subject: Re: [PATCH v2] kern: perform NULL check in unregister paths
> (command/extcmd)
> Message-ID: <57eced6f-6b12-4d95-953c-98329bce3b82@linux.ibm.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
>
>
> On 9/9/25 4:22 AM, Sudhakar Kuppusamy wrote:
>>
>>
>>> On 9 Sep 2025, at 12:25 PM, Srish Srinivasan <ssrish@linux.ibm.com>
>>> wrote:
>>>
>>> Many modules call grub_unregister_{command(), extcmd()} from
>>> GRUB_MOD_FINI() without checking for a failure in registration.
>>> This could lead to a NULL pointer dereference in unregistration.
>>>
>>> Perform explicit NULL check in both the unregister helpers.
>>>
>>> Signed-off-by: Srish Srinivasan <ssrish@linux.ibm.com>
>>
>> Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
>
Hi Srish,
Thank you so much for the patch!
A failure in registration will anyways returns NULL. Re checking it
might not make a sense. Do you have any specific scenario for this?
Thank you!
Regards,
Avnish Chouhan
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next parent reply other threads:[~2025-09-11 7:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.870.1757509050.1197.grub-devel@gnu.org>
2025-09-11 6:59 ` Avnish Chouhan [this message]
2025-09-11 8:09 ` [PATCH v2] kern: perform NULL check in unregister paths (command/extcmd) Srish Srinivasan
2025-09-11 8:27 ` [RFC PATCH 1/2] target/i386: add compatibility property for arch_capabilities Avnish Chouhan
2025-09-11 10:39 ` [RFC PATCH 2/2] target/i386: add compatibility property for pdcm feature Avnish Chouhan
2025-09-09 6:55 [PATCH v2] kern: perform NULL check in unregister paths (command/extcmd) Srish Srinivasan
2025-09-09 8:22 ` Sudhakar Kuppusamy
2025-09-09 15:09 ` Stefan Berger
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=453ab099b440e6597b6e7642fe488fc3@linux.ibm.com \
--to=avnish@linux.ibm.com \
--cc=daniel.kiper@oracle.com \
--cc=grub-devel@gnu.org \
--cc=nayna@linux.ibm.com \
--cc=phcoder@gmail.com \
--cc=sridharm@linux.ibm.com \
--cc=ssrish@linux.ibm.com \
--cc=stefanb@linux.ibm.com \
--cc=sudhakar@linux.ibm.com \
/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.