[arch-commits] Commit in grub/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Tue Dec 15 15:59:38 UTC 2015


    Date: Tuesday, December 15, 2015 @ 16:59:37
  Author: foutrelis
Revision: 256230

upgpkg: grub 1:2.02.beta2-6

- Fix CVE-2015-8370: Grub2 Authentication Bypass (FS#47386).
- Lock grub-extras revision to fix build failure (FS#46165).

Added:
  grub/trunk/0001-Fix-security-issue-when-reading-username-and-passwor.patch
Modified:
  grub/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-Fix-security-issue-when-reading-username-and-passwor.patch |   47 ++++++++++
 PKGBUILD                                                        |   16 ++-
 2 files changed, 58 insertions(+), 5 deletions(-)

Added: 0001-Fix-security-issue-when-reading-username-and-passwor.patch
===================================================================
--- 0001-Fix-security-issue-when-reading-username-and-passwor.patch	                        (rev 0)
+++ 0001-Fix-security-issue-when-reading-username-and-passwor.patch	2015-12-15 15:59:37 UTC (rev 256230)
@@ -0,0 +1,47 @@
+From e16eeda1200deabd0d3a4af968d526d62845a85f Mon Sep 17 00:00:00 2001
+From: Hector Marco-Gisbert <hecmargi at 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 at upv.es>
+Signed-off-by: Ismael Ripoll-Ripoll <iripoll at 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 010e550..524a3d8 100644
+--- a/grub-core/lib/crypto.c
++++ b/grub-core/lib/crypto.c
+@@ -468,7 +468,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.6.4
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-12-15 15:57:22 UTC (rev 256229)
+++ PKGBUILD	2015-12-15 15:59:37 UTC (rev 256230)
@@ -10,6 +10,7 @@
 
 _pkgver="2.02"
 _GRUB_GIT_TAG="grub-2.02-beta2"
+_GRUB_EXTRAS_COMMIT=4a56e2c2cc3d78f12f1788c27669a651071dee49
 
 _UNIFONT_VER="6.3.20131217"
 
@@ -22,8 +23,8 @@
 pkgname="grub"
 pkgdesc="GNU GRand Unified Bootloader (2)"
 pkgver=2.02.beta2
-pkgrel=5
-epoch="1"
+pkgrel=6
+epoch=1
 url="https://www.gnu.org/software/grub/"
 arch=('x86_64' 'i686')
 license=('GPL3')
@@ -53,11 +54,12 @@
 fi
 
 source=("grub-${_pkgver}::git+git://git.sv.gnu.org/grub.git#tag=${_GRUB_GIT_TAG}"
-        "grub-extras::git+git://git.sv.gnu.org/grub-extras.git#branch=master"
+        "grub-extras::git+git://git.sv.gnu.org/grub-extras.git#commit=${_GRUB_EXTRAS_COMMIT}"
         "http://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz"
         "http://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz.sig"
+        '0001-Fix-security-issue-when-reading-username-and-passwor.patch'
         'grub-10_linux-detect-archlinux-initramfs.patch'
-	'grub-intel-ucode.patch'
+        'grub-intel-ucode.patch'
         'grub-add-GRUB_COLOR_variables.patch'
         '60_memtest86+'
         'grub.default'
@@ -67,8 +69,9 @@
          'SKIP'
          '728b7439ac733a7c0d56049adec364c7'
          'SKIP'
+         '9589ec46a04f9bb4d5da987340a4a324'
          '945527e0de8d384166a4cf23439ae9ee'
-	 'a678629bc82c4e70c48d28242036d1d7'
+         'a678629bc82c4e70c48d28242036d1d7'
          'e506ae4a9f9f7d1b765febfa84e10d48'
          'be55eabc102f2c60b38ed35c203686d6'
          'a03ffd56324520393bf574cefccb893d'
@@ -83,6 +86,9 @@
 prepare() {
 	
 	cd "${srcdir}/grub-${_pkgver}/"
+
+	# CVE-2015-8370
+	patch -Np1 -i ../0001-Fix-security-issue-when-reading-username-and-passwor.patch
 	
 	msg "Patch to load Intel microcode"
 	patch -Np1 -i "${srcdir}/grub-intel-ucode.patch"



More information about the arch-commits mailing list