- Resolves: CVE-2024-45779 CVE-2024-45778 CVE-2025-1118 - Resolves: CVE-2025-0677 CVE-2024-45782 CVE-2025-0690 - Resolves: CVE-2024-45783 CVE-2025-0624 CVE-2024-45776 - Resolves: CVE-2025-0622 CVE-2024-45774 CVE-2024-45775 - Resolves: CVE-2024-45781 CVE-2024-45780 - Resolves: #RHEL-79700 - Resolves: #RHEL-79341 - Resolves: #RHEL-79875 - Resolves: #RHEL-79849 - Resolves: #RHEL-79707 - Resolves: #RHEL-79857 - Resolves: #RHEL-79709 - Resolves: #RHEL-79846 - Resolves: #RHEL-75737 - Resolves: #RHEL-79713 - Resolves: #RHEL-73785 - Resolves: #RHEL-73787 - Resolves: #RHEL-79704 - Resolves: #RHEL-79702 Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
32 lines
1003 B
Diff
32 lines
1003 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: B Horn <b@horn.uk>
|
|
Date: Fri, 1 Nov 2024 19:24:29 +0000
|
|
Subject: [PATCH] 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>
|
|
---
|
|
grub-core/commands/pgp.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/grub-core/commands/pgp.c b/grub-core/commands/pgp.c
|
|
index b81ac0ae4..4a6a5f9a0 100644
|
|
--- a/grub-core/commands/pgp.c
|
|
+++ b/grub-core/commands/pgp.c
|
|
@@ -982,6 +982,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);
|