mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-29 10:39:22 +00:00
commands/pgp: Unregister the "check_signatures" hooks on module unload
If the hooks are not removed they can be called after the module has been unloaded leading to an use-after-free. Fixes: CVE-2025-0622 Reported-by: B Horn <b@horn.uk> Signed-off-by: B Horn <b@horn.uk> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
0bf56bce47
commit
2123c5bca7
1 file changed
+2
@@ -1010,6 +1010,8 @@ GRUB_MOD_INIT(pgp)
|
||||
|
||||
GRUB_MOD_FINI(pgp)
|
||||
{
|
||||
grub_register_variable_hook ("check_signatures", NULL, NULL);
|
||||
grub_env_unset ("check_signatures");
|
||||
grub_verifier_unregister (&grub_pubkey_verifier);
|
||||
grub_unregister_extcmd (cmd);
|
||||
grub_unregister_extcmd (cmd_trust);
|
||||
|
||||
Reference in new issue
Block a user