Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1278508 - GRUB memory error when using kernel 4.3 or greater
Summary: GRUB memory error when using kernel 4.3 or greater
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 23
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-05 16:16 UTC by marasm76
Modified: 2019-11-15 17:01 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 15:24:59 UTC
Type: Bug
Embargoed:
marasm76: needinfo-


Attachments (Terms of Use)
mathieu's grubenv (1.00 KB, text/plain)
2015-12-01 19:45 UTC, Mathieu Chouquet-Stringer
no flags Details
mathieu's grub2.cfg (10.13 KB, text/plain)
2015-12-01 19:46 UTC, Mathieu Chouquet-Stringer
no flags Details
grub2-efi.cfg from MSI GS60 laptop (4.98 KB, text/plain)
2015-12-01 21:38 UTC, Jarod Wilson
no flags Details
grubenv from MSI GS60 laptop (1.00 KB, text/plain)
2015-12-01 21:39 UTC, Jarod Wilson
no flags Details

Description marasm76 2015-11-05 16:16:19 UTC
Description of problem:
GRUB throws a memory error after selecting kernel 4.3 or 4.4rc0 to boot while using a new Skylake-based system.

Error is: 
double free at 0x5f561120
Aborted. Press any key to exit.

The 0x number/address changes.

This same problem persists through multiple reinstalls, at first using Fedroa 22, then Fedora 23.

Version-Release number of selected component (if applicable):
GRUB 2

How reproducible:
Not sure if it's reproducible. Likely a problem related to my specific setup/components.


Steps to Reproduce:
1. Install Fedora 22/23
2. Add Rawhide nodebug kernel repo, update
3. Rawhide kernel installed. 

Actual results:
After reboot, if new kernel is selected, error from above appears

Expected results:
Normal boot

Additional info:
New Skylake system specifications are:
Intel Core i7 6700K
Asus Z170-A
16GB Corsair DDR4-2666
250GB Samsung 850 EVO

Comment 1 Mathieu Chouquet-Stringer 2015-11-09 10:56:01 UTC
I have the exact same issue with a custom built kernel (didn't try any rawhide stuff). In my case, it was a plain 4.3 kernel.

I'll try tonight with kernels coming from rawhide just to confirm.

Comment 2 Mathieu Chouquet-Stringer 2015-11-14 11:15:42 UTC
Ok so I tried with 4.4.0-0.rc0.git8.1.fc24 and it works.

I'm compiling a custom kernel as we speak to test.

Comment 3 Mathieu Chouquet-Stringer 2015-11-14 13:13:01 UTC
Doesn't work with 4.3.0-12036-g63f4f7e....

Maybe it's a kernel bug more than a grub thing.

Comment 4 Mathieu Chouquet-Stringer 2015-11-19 22:17:48 UTC
Works with 4.4.0-0.rc1.git1.1.fc24.x86_64

Still doesn't with my own 4.4.0-rc1-00144-gb4ba1f0

It's definitely a grub bug but I haven't found anything related upstream.

Comment 5 Jarod Wilson 2015-11-25 14:22:04 UTC
I'm encountering this on a ~year old laptop with a 4.2.6-based kernel build as well.

Comment 6 Mathieu Chouquet-Stringer 2015-11-25 21:24:38 UTC
The mystery remains then.

I'm typing this from a year old Thinkpad laptop on a homebuilt 4.3.0 kernel and grub2 works...

The whole boot + EFI + signed binaries thing makes it hard to debug.

I'll be looking at how to do that.

Comment 7 Jason Gates 2015-11-26 02:43:03 UTC
I'm having the same problem with a custom 4.2.6 kernel on a Lenovo Yoga 900 with a core i7 Skylake chip.  Same custom kernel on this ~4 year old Dell I'm typing from works just fine.  Does it by chance have anything to do with the kernel being compiled on the Dell and then installed on the Lenovo?  One of the issues I was patching was the wifi being disabled on the Lenovo, so downloading and building the custom kernel on that machine wasn't the best option (no ethernet port for backup).  That being said, if I need to, I can try to transfer everything I need from the Dell to the Lenovo via USB stick and build it there.  Does it sound like that might fix the problem?

Comment 8 Peter Jones 2015-12-01 19:27:27 UTC
Can anybody seeing this problem attach the grub2.cfg and grubenv files in use while they see it?

Comment 9 Mathieu Chouquet-Stringer 2015-12-01 19:44:20 UTC
Hi Peter, here are mines...

Comment 10 Mathieu Chouquet-Stringer 2015-12-01 19:45:09 UTC
Created attachment 1100992 [details]
mathieu's grubenv

Comment 11 Mathieu Chouquet-Stringer 2015-12-01 19:46:08 UTC
Created attachment 1100993 [details]
mathieu's grub2.cfg

Comment 12 Jarod Wilson 2015-12-01 21:37:51 UTC
So in my case, official Fedora kernel builds boot fine, it's only a local build that fails, even with 100% identical config. And the failure goes away when I disable secure boot in efi. My system's /etc/grub2.cfg points to a non-existent file, but /etc/grub2-efi.cfg is valid. Attaching shortly.

Comment 13 Jarod Wilson 2015-12-01 21:38:54 UTC
Created attachment 1101092 [details]
grub2-efi.cfg from MSI GS60 laptop

Comment 14 Jarod Wilson 2015-12-01 21:39:23 UTC
Created attachment 1101094 [details]
grubenv from MSI GS60 laptop

Comment 15 Mathieu Chouquet-Stringer 2015-12-01 21:42:33 UTC
My problem is identical to Jarod. Only locally built kernels fail. Haven't tried the secure boot thing but I shall and will report.

FYI I attached grub2-efi.cfg.

Comment 16 Jarod Wilson 2015-12-01 21:58:47 UTC
Turns out I'm an idiot, and hadn't enrolled my local signing key, so the kernel isn't expected to boot with secure boot enabled anyway, but it seems this isn't the expected error message...

Comment 17 Mathieu Chouquet-Stringer 2015-12-01 23:01:02 UTC
Most likely I'm idiot too. Jarod, I've been looking for instructions how to do that? Are there any online?

Comment 18 Josh Boyer 2015-12-03 16:08:08 UTC
(In reply to Mathieu Chouquet-Stringer from comment #17)
> Most likely I'm idiot too. Jarod, I've been looking for instructions how to
> do that? Are there any online?

You probably don't want to do that.  Enrolling the test certificate means that any kernel signed with that test cert will boot.  Since we ship the test cert, anyone in the world can create such a kernel.  That pretty much negates the benefit of Secure Boot.  (If you're creating your own signing cert and using that for local builds and only you have access to it, then it might be worthwhile.  Most people aren't doing that though.)

Instead, you might want to use mokutil to temporarily disable the validation steps.  mokutil --disable-validation as root.

Comment 19 Mathieu Chouquet-Stringer 2015-12-03 22:25:38 UTC
I ended up creating my own cert and signed my own kernel. It boots fine.

So yes, in the end it's clearly just a secure boot issue and as you mentioned, grub shouldn't fail with a "double free" when the kernel isn't (properly) signed.

Comment 20 Fedora End Of Life 2016-11-24 13:06:35 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 21 Fedora End Of Life 2016-12-20 15:24:59 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.