Kernel Bug Tracker – Bug 45991
Loading efivars on non-native EFI architecture triggers NULL deref
Last modified: 2012-11-05 23:09:41 UTC
In drivers/firmware/efivars.c, efivars_init() initializes "ops" struct from global "efi" struct, and then, e.g., calls ops->get_next_variable() in register_efivars().
If architecture is non-native (32-bit kernel on 64-bit EFI, or reverse), arch/x86/platform/efi/efi.c skips initialization of "efi" struct:
which causes a NULL deref when efivars is loaded.
The issue is still resent in current git tree, as far as I can see.
Created attachment 77741 [details]
NULL deref trace
thanks for the fix but shouldn't there be a reference to the bug/reporter in the commit message as well?
This is now fixed in upstream in Linus' tree and in the 3.4 and 3.6 stable releases.
Sorry, I should have noted the versions containing this fix are v3.7-rc3 (Linus' tree), and versions v3.4.17 and v3.6.5 of the stable trees.
A patch referencing this bug report has been merged in Linux v3.7-rc3:
Author: Olof Johansson <email@example.com>
Date: Wed Oct 24 10:00:44 2012 -0700
x86: efi: Turn off efi_enabled after setup on mixed fw/kernel