Bug 1278508 - GRUB memory error when using kernel 4.3 or greater [NEEDINFO]
GRUB memory error when using kernel 4.3 or greater
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
23
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-05 11:16 EST by marasm76
Modified: 2016-12-20 10:24 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 10:24:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
pjones: needinfo? (marasm76)


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

  None (edit)
Description marasm76 2015-11-05 11:16:19 EST
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 05:56:01 EST
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 06:15:42 EST
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 08:13:01 EST
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 17:17:48 EST
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 09:22:04 EST
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 16:24:38 EST
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-25 21:43:03 EST
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 14:27:27 EST
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 14:44:20 EST
Hi Peter, here are mines...
Comment 10 Mathieu Chouquet-Stringer 2015-12-01 14:45 EST
Created attachment 1100992 [details]
mathieu's grubenv
Comment 11 Mathieu Chouquet-Stringer 2015-12-01 14:46 EST
Created attachment 1100993 [details]
mathieu's grub2.cfg
Comment 12 Jarod Wilson 2015-12-01 16:37:51 EST
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 16:38 EST
Created attachment 1101092 [details]
grub2-efi.cfg from MSI GS60 laptop
Comment 14 Jarod Wilson 2015-12-01 16:39 EST
Created attachment 1101094 [details]
grubenv from MSI GS60 laptop
Comment 15 Mathieu Chouquet-Stringer 2015-12-01 16:42:33 EST
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 16:58:47 EST
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 18:01:02 EST
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 11:08:08 EST
(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 17:25:38 EST
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 08:06:35 EST
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 10:24:59 EST
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.