On 2025-09-10 18:27, [email protected] wrote:
----------------------------------------------------------------------

Message: 1
Date: Tue, 9 Sep 2025 11:09:55 -0400
From: Stefan Berger <[email protected]>
To: Sudhakar Kuppusamy <[email protected]>, Srish Srinivasan
        <[email protected]>
Cc: [email protected], [email protected], [email protected],
        [email protected], [email protected]
Subject: Re: [PATCH v2] kern: perform NULL check in unregister paths
        (command/extcmd)
Message-ID: <[email protected]>
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 <[email protected]> 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 <[email protected]>

Reviewed-by: Sudhakar Kuppusamy <[email protected]>
Reviewed-by: Stefan Berger <[email protected]>


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
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to