diff --git a/SOURCES/0362-ieee1275-ofnet-Fix-grub_malloc-removed-after-added-s.patch b/SOURCES/0362-ieee1275-ofnet-Fix-grub_malloc-removed-after-added-s.patch new file mode 100644 index 0000000000000000000000000000000000000000..92da0261ca865509f1684db2e773cc719edfb9be --- /dev/null +++ b/SOURCES/0362-ieee1275-ofnet-Fix-grub_malloc-removed-after-added-s.patch @@ -0,0 +1,32 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nicolas Frayer <nfrayer@redhat.com> +Date: Wed, 19 Mar 2025 17:39:41 +0100 +Subject: [PATCH] ieee1275/ofnet: Fix grub_malloc() removed after added safe + math functions + +grub_malloc() has been inadvertently removed from the ieee1275/ofnet +code after it has been modified to use safe match function. + +Fixes: 4beeff8a (net: Use safe math macros to prevent overflows) + +Tested-by: Marta Lewandowska <mlewando@redhat.com> +Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> +Signed-off-by: Nicolas Frayer <nfrayer@redhat.com> +--- + grub-core/net/drivers/ieee1275/ofnet.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/drivers/ieee1275/ofnet.c +index 3e1b9094e2ab..37bc82467f60 100644 +--- a/grub-core/net/drivers/ieee1275/ofnet.c ++++ b/grub-core/net/drivers/ieee1275/ofnet.c +@@ -463,6 +463,9 @@ search_net_devices (struct grub_ieee1275_devalias *alias) + return 0; + } + } ++ ++ ofdata->path = grub_malloc(sz); ++ + if (!ofdata->path) + { + grub_print_error (); diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches index 2ca6a9be75ca741d3786f9501f9033b833ffcb95..c18280a396d83124a237fda4dcb08c4aea0da2ff 100644 --- a/SOURCES/grub.patches +++ b/SOURCES/grub.patches @@ -358,3 +358,4 @@ Patch0358: 0358-loader-i386-linux-Cast-left-shift-to-grub_uint32_t.patch Patch0359: 0359-loader-i386-bsd-Use-safe-math-to-avoid-underflow.patch Patch0360: 0360-fs-ext2-Rework-out-of-bounds-read-for-inline-and-ext.patch Patch0361: 0361-powerpc-increase-MIN-RMA-size-for-CAS-negotiation.patch +Patch0362: 0362-ieee1275-ofnet-Fix-grub_malloc-removed-after-added-s.patch diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec index d8825a3a2b5defd772b3f58baf68ab80f6534c37..ad7fadc3faa64cac51418f76b80007c38f5992c6 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec @@ -17,7 +17,7 @@ Name: grub2 Epoch: 1 Version: 2.12 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPL-3.0-or-later URL: http://www.gnu.org/software/grub/ @@ -587,11 +587,15 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog -* Tue Mar 18 2025 Release Engineering <releng@rockylinux.org> - 2.12-13 +* Tue Mar 25 2025 Release Engineering <releng@rockylinux.org> - 2.12-14 - Replace sbat with Rocky Linux sbat (label) - Change bug tracker URL (label) - Add missing riscv64 support (label) +* Tue Mar 25 2025 Nicolas Frayer <nfrayer@redhat.com> 2.12-14 +- ieee1275/ofnet: Fix grub_malloc() removed after added safe +- Related: #RHEL-80073 + * Tue Mar 18 2025 Nicolas Frayer <nfrayer@redhat.com> 2.12-13 - powerpc: increase MIN RMA size for CAS negotiation - Resolves: #RHEL-76429