Debrand for AlmaLinux
This commit is contained in:
commit
7ddd020c7e
@ -0,0 +1,59 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nicolas Frayer <nfrayer@redhat.com>
|
||||||
|
Date: Wed, 16 Oct 2024 15:50:32 +0200
|
||||||
|
Subject: [PATCH] cmd/search: Fix a possible NULL ptr dereference
|
||||||
|
|
||||||
|
When querying about a partition UUID, we're not checking
|
||||||
|
for get_device_uuid() return value, which can possibly
|
||||||
|
result in dereferencing a NULL pointer.
|
||||||
|
|
||||||
|
Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
|
||||||
|
Co-authored-by: Chuong Tran <anhchuong89@gmail.com>
|
||||||
|
---
|
||||||
|
grub-core/commands/search.c | 28 +++++++++++++++-------------
|
||||||
|
1 file changed, 15 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/grub-core/commands/search.c b/grub-core/commands/search.c
|
||||||
|
index c052cb098c36..ab0122704c34 100644
|
||||||
|
--- a/grub-core/commands/search.c
|
||||||
|
+++ b/grub-core/commands/search.c
|
||||||
|
@@ -211,24 +211,26 @@ iterate_device (const char *name, void *data)
|
||||||
|
struct uuid_context uuid_ctx;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
- get_device_uuid(name, &quid_name);
|
||||||
|
- if (!grub_strcmp(quid_name, ctx->key))
|
||||||
|
+ if (get_device_uuid(name, &quid_name))
|
||||||
|
{
|
||||||
|
- uuid_ctx.name = name;
|
||||||
|
- uuid_ctx.uuid = quid_name;
|
||||||
|
+ if (!grub_strcmp(quid_name, ctx->key))
|
||||||
|
+ {
|
||||||
|
+ uuid_ctx.name = name;
|
||||||
|
+ uuid_ctx.uuid = quid_name;
|
||||||
|
|
||||||
|
- ret = grub_device_iterate (check_for_duplicate, &uuid_ctx);
|
||||||
|
+ ret = grub_device_iterate (check_for_duplicate, &uuid_ctx);
|
||||||
|
|
||||||
|
- if (ret)
|
||||||
|
- {
|
||||||
|
- grub_printf("Duplicated media UUID found, rebooting ...\n");
|
||||||
|
- grub_sleep(10);
|
||||||
|
- grub_reboot();
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ if (ret)
|
||||||
|
+ {
|
||||||
|
+ grub_printf("Duplicated media UUID found, rebooting ...\n");
|
||||||
|
+ grub_sleep(10);
|
||||||
|
+ grub_reboot();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (quid_name) grub_free (quid_name);
|
||||||
|
+ if (quid_name) grub_free (quid_name);
|
||||||
|
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marta Lewandowska <mlewando@redhat.com>
|
||||||
|
Date: Thu, 21 Nov 2024 11:32:18 -0600
|
||||||
|
Subject: [PATCH] 10_linux.in: escape semicolon and ampersand on BLS upddate
|
||||||
|
|
||||||
|
Besides escaping the character '/', escape ';' and '&' which may be set on on
|
||||||
|
kernel parameters.
|
||||||
|
|
||||||
|
Resolves: #RHEL-25558
|
||||||
|
Signed-off-by: Marta Lewandowska <mlewando@redhat.com>
|
||||||
|
Reviewed-by: Leo Sandoval <lsandova@redhat.com>
|
||||||
|
---
|
||||||
|
util/grub.d/10_linux.in | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
mode change 100644 => 100755 util/grub.d/10_linux.in
|
||||||
|
|
||||||
|
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
|
index 041a11529..7754ef853
|
||||||
|
--- a/util/grub.d/10_linux.in
|
||||||
|
+++ b/util/grub.d/10_linux.in
|
||||||
|
@@ -176,6 +176,8 @@ update_bls_cmdline()
|
||||||
|
options="${options} ${GRUB_CMDLINE_LINUX_DEBUG}"
|
||||||
|
fi
|
||||||
|
options="$(echo "${options}" | sed -e 's/\//\\\//g')"
|
||||||
|
+ options="$(echo "${options}" | sed -e 's/\;/\\\;/g')"
|
||||||
|
+ options="$(echo "${options}" | sed -e 's/\\&/\\\\&/g')"
|
||||||
|
sed -i -e "s/^options.*/options ${options}/" "${blsdir}/${bls}.conf"
|
||||||
|
done
|
||||||
|
}
|
@ -278,7 +278,7 @@ Provides: almalinux(grub2-sig-key) = 202303 \
|
|||||||
%{expand:%%ifarch x86_64 \
|
%{expand:%%ifarch x86_64 \
|
||||||
Conflicts: shim-x64 <= 15.6-1.el9.alma \
|
Conflicts: shim-x64 <= 15.6-1.el9.alma \
|
||||||
Conflicts: shim-ia32 <= 15.6-1.el9.alma \
|
Conflicts: shim-ia32 <= 15.6-1.el9.alma \
|
||||||
%%endif} \
|
%%endif} \
|
||||||
%{?legacy_provides:Provides: %{name} = %{evr}} \
|
%{?legacy_provides:Provides: %{name} = %{evr}} \
|
||||||
%{-o:Obsoletes: %{name}-efi < %{evr}} \
|
%{-o:Obsoletes: %{name}-efi < %{evr}} \
|
||||||
\
|
\
|
||||||
|
@ -349,3 +349,5 @@ Patch0348: 0348-chainloader-remove-device-path-debug-message.patch
|
|||||||
Patch0349: 0349-grub2-mkconfig-Simplify-os_name-detection.patch
|
Patch0349: 0349-grub2-mkconfig-Simplify-os_name-detection.patch
|
||||||
Patch0350: 0350-grub-mkconfig-Remove-check-for-mount-point-for-grub-.patch
|
Patch0350: 0350-grub-mkconfig-Remove-check-for-mount-point-for-grub-.patch
|
||||||
Patch0351: 0351-arm64-Use-proper-memory-type-for-kernel-allocation.patch
|
Patch0351: 0351-arm64-Use-proper-memory-type-for-kernel-allocation.patch
|
||||||
|
Patch0352: 0352-cmd-search-Fix-a-possible-NULL-ptr-dereference.patch
|
||||||
|
Patch0353: 0353-10_linux.in-escape-semicolon-and-ampersand-on-BLS-up.patch
|
@ -16,7 +16,7 @@
|
|||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.06
|
Version: 2.06
|
||||||
Release: 92%{?dist}.alma.1
|
Release: 94%{?dist}.alma.1
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.gnu.org/software/grub/
|
URL: http://www.gnu.org/software/grub/
|
||||||
@ -538,12 +538,21 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Sep 30 2024 Andrew Lukoshko <alukoshko@almalinux.org> - 2.06-92.alma.1
|
* Tue Mar 11 2025 Eduard Abdullin <eabdullin@almalinux.org> - 1:2.06-94.alma.1
|
||||||
- Debrand for AlmaLinux
|
- Debrand for AlmaLinux
|
||||||
|
|
||||||
|
* Thu Nov 21 2024 Leo Sandoval <lsandova@redhat.com> - 2.06-94
|
||||||
|
- 10_linux.in: escape semicolon and ampersand on BLS upddate
|
||||||
|
- Resolves: #RHEL-25558
|
||||||
|
|
||||||
|
* Wed Oct 16 2024 Nicolas Frayer <nfrayer@redhat.com> 2.06-93
|
||||||
|
- cmd/search: Fix a possible NULL ptr dereference
|
||||||
|
- Resolves: #RHEL-61263
|
||||||
|
|
||||||
* Tue Aug 13 2024 Nicolas Frayer <nfrayer@redhat.com> - 2.06-92
|
* Tue Aug 13 2024 Nicolas Frayer <nfrayer@redhat.com> - 2.06-92
|
||||||
- arm64/linux: Allocate memory for kernel with EFI_LOADER_CODE type
|
- arm64/linux: Allocate memory for kernel with EFI_LOADER_CODE type
|
||||||
- Resolves: #RHEL-49868
|
- Resolves: #RHEL-49868
|
||||||
|
|
||||||
* Fri Aug 2 2024 Leo Sandoval <lsandova@redhat.com> - 2.06-91
|
* Fri Aug 2 2024 Leo Sandoval <lsandova@redhat.com> - 2.06-91
|
||||||
- Set /boot/grub2/grub.cfg to 0600 mode if present
|
- Set /boot/grub2/grub.cfg to 0600 mode if present
|
||||||
- Resolves: #RHEL-45870
|
- Resolves: #RHEL-45870
|
||||||
@ -563,6 +572,7 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
|||||||
* Wed Jul 31 2024 Andrew Lukoshko <alukoshko@almalinux.org> - 2.06-87
|
* Wed Jul 31 2024 Andrew Lukoshko <alukoshko@almalinux.org> - 2.06-87
|
||||||
- grub2-mkconfig: Simplify os_name detection
|
- grub2-mkconfig: Simplify os_name detection
|
||||||
- Resolves: #RHEL-32099
|
- Resolves: #RHEL-32099
|
||||||
|
|
||||||
* Tue Jul 16 2024 Nicolas Frayer <nfrayer@redhat.com> - 2.06-86
|
* Tue Jul 16 2024 Nicolas Frayer <nfrayer@redhat.com> - 2.06-86
|
||||||
- chainloader: Remove unexpected "/EndEntire"
|
- chainloader: Remove unexpected "/EndEntire"
|
||||||
- Resolves: #RHEL-4380
|
- Resolves: #RHEL-4380
|
||||||
|
Loading…
Reference in New Issue
Block a user