Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Peter Jones | 4e9ad78414 | |
Peter Jones | caedd1e47d | |
Peter Jones | f240862496 | |
Peter Jones | 6ca4fc6ea7 | |
Peter Jones | 7cb945b4bd |
|
@ -4,3 +4,6 @@ clog
|
|||
/unifont-5.1.20080820.pcf.gz
|
||||
/theme.tar.bz2
|
||||
/gitignore
|
||||
kojilogs
|
||||
/grub-*/
|
||||
.build*.log
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
From 2c5fbe5cd72dc8225d49d75b714962787cc273f4 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 28 Apr 2015 11:15:03 -0400
|
||||
Subject: [PATCH 1/2] Make grub2-mkconfig construct titles that look like the
|
||||
ones we want elsewhere.
|
||||
|
||||
Resolves: rhbz#1215839
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
util/grub.d/10_linux.in | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
index e8088a1..ed4c1b7 100644
|
||||
--- a/util/grub.d/10_linux.in
|
||||
+++ b/util/grub.d/10_linux.in
|
||||
@@ -66,6 +66,15 @@ case x"$GRUB_FS" in
|
||||
;;
|
||||
esac
|
||||
|
||||
+mktitle ()
|
||||
+{
|
||||
+ local OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})"
|
||||
+ local OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})"
|
||||
+
|
||||
+ local titlestr="${OS_NAME} (%s) ${OS_VERS}"
|
||||
+ echo -n ${titlestr}
|
||||
+}
|
||||
+
|
||||
title_correction_code=
|
||||
|
||||
linux_entry ()
|
||||
@@ -96,15 +105,14 @@ linux_entry ()
|
||||
if [ x$type != xsimple ] ; then
|
||||
case $type in
|
||||
recovery)
|
||||
- title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
|
||||
+ title="$(printf "$(mktitle) (recovery mode)" "${version}")" ;;
|
||||
*)
|
||||
- title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
|
||||
+ title="$(printf "$(mktitle)" "${version}")" ;;
|
||||
esac
|
||||
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
|
||||
replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
|
||||
quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
|
||||
title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
|
||||
- grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
|
||||
fi
|
||||
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
|
||||
else
|
||||
--
|
||||
2.3.6
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
From 97b30ff21f97a98dbb7de3fd676fb360b6e28040 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 28 Apr 2015 11:17:02 -0400
|
||||
Subject: [PATCH 2/2] Make rescue and debug entries sort right /again/ in
|
||||
grub2-mkconfig.
|
||||
|
||||
Related: rhbz#12145839
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
util/grub-mkconfig_lib.in | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
|
||||
index e85b60c..2e03651 100644
|
||||
--- a/util/grub-mkconfig_lib.in
|
||||
+++ b/util/grub-mkconfig_lib.in
|
||||
@@ -254,14 +254,14 @@ version_test_gt ()
|
||||
*.old:*.old) ;;
|
||||
*.old:*) version_test_gt_a="`echo -n "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
|
||||
*:*.old) version_test_gt_b="`echo -n "$version_test_gt_b" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=ge ;;
|
||||
- *-rescue-*:*-rescue-*) ;;
|
||||
- *.debug:*.debug) ;;
|
||||
- *-rescue-*:*.debug) return 1 ;;
|
||||
- *.debug:*-rescue-*) return 0 ;;
|
||||
- *-rescue-*:*) return 1 ;;
|
||||
- *:*-rescue-*) return 0 ;;
|
||||
- *.debug:*) return 1 ;;
|
||||
- *:*.debug) return 0 ;;
|
||||
+ *-rescue*:*-rescue*) ;;
|
||||
+ *?debug:*?debug) ;;
|
||||
+ *-rescue*:*?debug) return 1 ;;
|
||||
+ *?debug:*-rescue*) return 0 ;;
|
||||
+ *-rescue*:*) return 1 ;;
|
||||
+ *:*-rescue*) return 0 ;;
|
||||
+ *?debug:*) return 1 ;;
|
||||
+ *:*?debug) return 0 ;;
|
||||
esac
|
||||
version_test_numeric "$version_test_gt_a" "$version_test_gt_cmp" "$version_test_gt_b"
|
||||
return "$?"
|
||||
--
|
||||
2.3.6
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
From eba919d27789fd0c8f085060672a122b61d3ebda Mon Sep 17 00:00:00 2001
|
||||
From: Hector Marco-Gisbert <hecmargi@upv.es>
|
||||
Date: Fri, 13 Nov 2015 16:21:09 +0100
|
||||
Subject: [PATCH] Fix security issue when reading username and password
|
||||
|
||||
This patch fixes two integer underflows at:
|
||||
* grub-core/lib/crypto.c
|
||||
* grub-core/normal/auth.c
|
||||
|
||||
Resolves: CVE-2015-8370
|
||||
|
||||
Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
|
||||
Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
|
||||
---
|
||||
grub-core/lib/crypto.c | 2 +-
|
||||
grub-core/normal/auth.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
|
||||
index 8e8426c..a23519c 100644
|
||||
--- a/grub-core/lib/crypto.c
|
||||
+++ b/grub-core/lib/crypto.c
|
||||
@@ -456,7 +456,7 @@ grub_password_get (char buf[], unsigned buf_size)
|
||||
break;
|
||||
}
|
||||
|
||||
- if (key == '\b')
|
||||
+ if (key == '\b' && cur_len)
|
||||
{
|
||||
cur_len--;
|
||||
continue;
|
||||
diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
|
||||
index c6bd96e..5782ec5 100644
|
||||
--- a/grub-core/normal/auth.c
|
||||
+++ b/grub-core/normal/auth.c
|
||||
@@ -172,7 +172,7 @@ grub_username_get (char buf[], unsigned buf_size)
|
||||
break;
|
||||
}
|
||||
|
||||
- if (key == '\b')
|
||||
+ if (key == '\b' && cur_len)
|
||||
{
|
||||
cur_len--;
|
||||
grub_printf ("\b");
|
||||
--
|
||||
2.5.0
|
||||
|
28
grub2.spec
28
grub2.spec
|
@ -47,7 +47,7 @@
|
|||
Name: grub2
|
||||
Epoch: 1
|
||||
Version: 2.02
|
||||
Release: 0.15%{?dist}
|
||||
Release: 0.18%{?dist}
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
|
||||
Group: System Environment/Base
|
||||
|
@ -215,6 +215,9 @@ Patch0152: 0152-Load-arm-with-SB-enabled.patch
|
|||
Patch0153: 0153-Try-prefix-if-fw_path-doesn-t-work.patch
|
||||
Patch0154: 0154-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch
|
||||
Patch0155: 0001-Update-to-minilzo-2.08.patch
|
||||
Patch0156: 0001-Make-grub2-mkconfig-construct-titles-that-look-like-.patch
|
||||
Patch0157: 0002-Make-rescue-and-debug-entries-sort-right-again-in-gr.patch
|
||||
Patch0158: 0158-Fix-security-issue-when-reading-username-and-passwor.patch
|
||||
|
||||
BuildRequires: flex bison binutils python
|
||||
BuildRequires: ncurses-devel xz-devel bzip2-devel
|
||||
|
@ -363,8 +366,9 @@ make %{?_smp_mflags}
|
|||
|
||||
GRUB_MODULES=" all_video boot btrfs cat chain configfile echo \
|
||||
efifwsetup efinet ext2 fat font gfxmenu gfxterm gzio halt \
|
||||
hfsplus iso9660 jpeg loadenv lvm mdraid09 mdraid1x minicmd \
|
||||
normal part_apple part_msdos part_gpt password_pbkdf2 png \
|
||||
hfsplus iso9660 jpeg loadenv loopback lvm mdraid09 mdraid1x \
|
||||
minicmd normal part_apple part_msdos part_gpt \
|
||||
password_pbkdf2 png \
|
||||
reboot search search_fs_uuid search_fs_file search_label \
|
||||
serial sleep syslinuxcfg test tftp video xfs"
|
||||
%ifarch aarch64
|
||||
|
@ -372,7 +376,7 @@ GRUB_MODULES+=" linux "
|
|||
%else
|
||||
GRUB_MODULES+=" backtrace usb usbserial_common "
|
||||
GRUB_MODULES+=" usbserial_pl2303 usbserial_ftdi usbserial_usbdebug "
|
||||
GRUB_MODULES+=" linuxefi multiboot2 multiboot "
|
||||
GRUB_MODULES+=" linuxefi"
|
||||
%endif
|
||||
./grub-mkimage -O %{grubefiarch} -o %{grubefiname}.orig -p /EFI/%{efidir} \
|
||||
-d grub-core ${GRUB_MODULES}
|
||||
|
@ -634,7 +638,7 @@ fi
|
|||
%exclude /boot/%{name}/themes/system/*
|
||||
%exclude %{_datarootdir}/grub/themes/
|
||||
%{_infodir}/%{name}*
|
||||
%exclude %{_mandir}
|
||||
%{_datadir}/man/man?/*
|
||||
%doc grub-%{tarversion}/COPYING grub-%{tarversion}/INSTALL
|
||||
%doc grub-%{tarversion}/NEWS grub-%{tarversion}/README
|
||||
%doc grub-%{tarversion}/THANKS grub-%{tarversion}/TODO
|
||||
|
@ -649,6 +653,20 @@ fi
|
|||
%{_datarootdir}/grub/themes/starfield
|
||||
|
||||
%changelog
|
||||
* Thu Dec 10 2015 Peter Jones <pjones@redhat.com> - 2.02-0.18
|
||||
- Fix security issue when reading username and password
|
||||
Related: CVE-2015-8370
|
||||
- Do a better job of handling GRUB2_PASSWORD
|
||||
Related: rhbz#1284370
|
||||
|
||||
* Fri Nov 20 2015 Peter Jones <pjones@redhat.com> - 2.02-0.17
|
||||
- Rebuild without multiboot* modules in the EFI image.
|
||||
Related: rhbz#1264103
|
||||
|
||||
* Tue Apr 28 2015 Peter Jones <pjones@redhat.com> - 2.02-0.16
|
||||
- Make grub2-mkconfig produce the kernel titles we actually want.
|
||||
Resolves: rhbz#1215839
|
||||
|
||||
* Mon Jan 05 2015 Peter Jones <pjones@redhat.com> - 2.02-0.15
|
||||
- Bump release to rebuild with Ralf Corsépius's fixes.
|
||||
|
||||
|
|
Loading…
Reference in New Issue