<div dir="ltr">Hi Awais,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On 28 December 2015 at 10:40, Belal, Awais <span dir="ltr"><<a href="mailto:Awais_Belal@mentor.com" target="_blank">Awais_Belal@mentor.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Joshua,<br>
<br>
<a href="http://patchwork.openembedded.org/patch/110999/" rel="noreferrer" target="_blank">http://patchwork.openembedded.org/patch/110999/</a><br>
<br></blockquote><div><br></div><div>Unfortunately this doesn't apply on my fido branch:<br><br>ERROR: Command Error: exit status: 1 Output:<br>Applying patch 0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch<br>patching file grub-core/lib/crypto.c<br>Hunk #1 FAILED at 470.<br>1 out of 1 hunk FAILED -- rejects in file grub-core/lib/crypto.c<br>patching file grub-core/normal/auth.c<br>Hunk #1 FAILED at 174.<br>1 out of 1 hunk FAILED -- rejects in file grub-core/normal/auth.c<br>Patch 0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch does not apply (enforce with -f)<br>ERROR: Function failed: patch_do_patch<br>ERROR: Logfile of failure stored in: /home/joshuagl/Projects/poky-fido/build/tmp/work/i586-poky-linux/grub/2.00-r1/temp/log.do_patch.23384<br>ERROR: Task 1 (/home/joshuagl/Projects/poky-fido/meta/recipes-bsp/grub/<a href="http://grub_2.00.bb">grub_2.00.bb</a>, do_patch) failed with exit code '1'<br><br></div><div>Regards,<br><br></div><div>Joshua<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
BR,<br>
Awais<br>
<br>
________________________________________<br>
From: Joshua Lock [<a href="mailto:joshua.lock@collabora.co.uk">joshua.lock@collabora.co.uk</a>]<br>
Sent: Wednesday, December 23, 2015 6:24 PM<br>
To: Belal, Awais; <a href="mailto:openembedded-core@lists.openembedded.org">openembedded-core@lists.openembedded.org</a><br>
Subject: Re: [OE-core] [dizzy][PATCH] grub2: Fix CVE-2015-8370<br>
<br>
Hi Awais,<br>
<br>
Will you be submitting a similar patch for Fido too?<br>
(neither the dizzy nor jethro versions you've already sent apply<br>
cleanly).<br>
<br>
Regards,<br>
<br>
Joshua<br>
<br>
On Wed, 2015-12-23 at 16:20 +0500, Awais Belal wrote:<br>
> <a href="http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432" rel="noreferrer" target="_blank">http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432</a><br>
<span class="">> e109771bb8febafca7a5f1f2<br>
><br>
> Signed-off-by: Awais Belal <<a href="mailto:awais_belal@mentor.com">awais_belal@mentor.com</a>><br>
> ---<br>
> ...E-2015-8370-Grub2-user-pass-vulnerability.patch | 52<br>
> ++++++++++++++++++++++<br>
</span>> meta/recipes-bsp/grub/<a href="http://grub-efi_2.00.bb" rel="noreferrer" target="_blank">grub-efi_2.00.bb</a> | 1 +<br>
> meta/recipes-bsp/grub/<a href="http://grub_2.00.bb" rel="noreferrer" target="_blank">grub_2.00.bb</a> | 1 +<br>
> 3 files changed, 54 insertions(+)<br>
> create mode 100644 meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-<br>
> 8370-Grub2-user-pass-vulnerability.patch<br>
><br>
> diff --git a/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-<br>
> Grub2-user-pass-vulnerability.patch b/meta/recipes-<br>
> bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-<br>
<span class="">> vulnerability.patch<br>
> new file mode 100644<br>
</span>> index 0000000..f9252e9<br>
> --- /dev/null<br>
> +++ b/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-<br>
<div><div class="h5">> pass-vulnerability.patch<br>
> @@ -0,0 +1,52 @@<br>
> +Upstream-Status: Accepted<br>
> +Signed-off-by: Awais Belal <<a href="mailto:awais_belal@mentor.com">awais_belal@mentor.com</a>><br>
> +<br>
> +From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00<br>
> 2001<br>
> +From: Hector Marco-Gisbert <<a href="mailto:hecmargi@upv.es">hecmargi@upv.es</a>><br>
> +Date: Wed, 16 Dec 2015 04:57:18 +0000<br>
> +Subject: Fix security issue when reading username and password<br>
> +<br>
> +This patch fixes two integer underflows at:<br>
> + * grub-core/lib/crypto.c<br>
> + * grub-core/normal/auth.c<br>
> +<br>
> +CVE-2015-8370<br>
> +<br>
> +Signed-off-by: Hector Marco-Gisbert <<a href="mailto:hecmargi@upv.es">hecmargi@upv.es</a>><br>
> +Signed-off-by: Ismael Ripoll-Ripoll <<a href="mailto:iripoll@disca.upv.es">iripoll@disca.upv.es</a>><br>
> +Also-By: Andrey Borzenkov <<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>><br>
> +---<br>
> +diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c<br>
> +index 010e550..683a8aa 100644<br>
> +--- a/grub-core/lib/crypto.c<br>
> ++++ b/grub-core/lib/crypto.c<br>
> +@@ -470,7 +470,8 @@ grub_password_get (char buf[], unsigned<br>
> buf_size)<br>
> +<br>
> + if (key == '\b')<br>
> + {<br>
> +- cur_len--;<br>
> ++ if (cur_len)<br>
> ++ cur_len--;<br>
> + continue;<br>
> + }<br>
> +<br>
> +diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c<br>
> +index c6bd96e..8615c48 100644<br>
> +--- a/grub-core/normal/auth.c<br>
> ++++ b/grub-core/normal/auth.c<br>
> +@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned<br>
> buf_size)<br>
> +<br>
> + if (key == '\b')<br>
> + {<br>
> +- cur_len--;<br>
> +- grub_printf ("\b");<br>
> ++ if (cur_len)<br>
> ++ {<br>
> ++ cur_len--;<br>
> ++ grub_printf ("\b");<br>
> ++ }<br>
> + continue;<br>
> + }<br>
> +<br>
> +--<br>
> +cgit v0.9.0.2<br>
</div></div>> diff --git a/meta/recipes-bsp/grub/<a href="http://grub-efi_2.00.bb" rel="noreferrer" target="_blank">grub-efi_2.00.bb</a> b/meta/recipes-<br>
> bsp/grub/<a href="http://grub-efi_2.00.bb" rel="noreferrer" target="_blank">grub-efi_2.00.bb</a><br>
> index 7674255..6822e7a 100644<br>
> --- a/meta/recipes-bsp/grub/<a href="http://grub-efi_2.00.bb" rel="noreferrer" target="_blank">grub-efi_2.00.bb</a><br>
> +++ b/meta/recipes-bsp/grub/<a href="http://grub-efi_2.00.bb" rel="noreferrer" target="_blank">grub-efi_2.00.bb</a><br>
> @@ -30,6 +30,7 @@ SRC_URI = "<a href="ftp://ftp.gnu.org/gnu/grub/grub-${PV}.ta" rel="noreferrer" target="_blank">ftp://ftp.gnu.org/gnu/grub/grub-${PV}.ta</a><br>
> r.gz \<br>
> file://grub-2.00-add-oe-kernel.patch \<br>
> file://grub-efi-fix-with-glibc-2.20.patch \<br>
> file://0001-parse_dhcp_vendor-Add-missing-const-<br>
> qualifiers.patch \<br>
> + file://0001-Fix-CVE-2015-8370-Grub2-user-pass-<br>
> vulnerability.patch \<br>
> "<br>
> SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"<br>
> SRC_URI[sha256sum] =<br>
> "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"<br>
> diff --git a/meta/recipes-bsp/grub/<a href="http://grub_2.00.bb" rel="noreferrer" target="_blank">grub_2.00.bb</a> b/meta/recipes-<br>
> bsp/grub/<a href="http://grub_2.00.bb" rel="noreferrer" target="_blank">grub_2.00.bb</a><br>
> index d4df676..94b6da9 100644<br>
> --- a/meta/recipes-bsp/grub/<a href="http://grub_2.00.bb" rel="noreferrer" target="_blank">grub_2.00.bb</a><br>
> +++ b/meta/recipes-bsp/grub/<a href="http://grub_2.00.bb" rel="noreferrer" target="_blank">grub_2.00.bb</a><br>
<span class="">> @@ -25,6 +25,7 @@ SRC_URI = "<a href="ftp://ftp.gnu.org/gnu/grub/grub-${PV}.ta" rel="noreferrer" target="_blank">ftp://ftp.gnu.org/gnu/grub/grub-${PV}.ta</a><br>
> r.gz \<br>
</span>> file://fix-endianness-problem.patch \<br>
> file://grub2-remove-sparc64-setup-from-x86-builds.patch \<br>
> file://0001-parse_dhcp_vendor-Add-missing-const-<br>
> qualifiers.patch \<br>
> + file://0001-Fix-CVE-2015-8370-Grub2-user-pass-<br>
> vulnerability.patch \<br>
> "<br>
><br>
> SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"<br>
<div class=""><div class="h5">> --<br>
> 1.9.1<br>
><br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</div></div></blockquote></div><br></div></div></div>