UEFI GRUB2 enforces NX even with a non-NX shim
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| grub2 (Ubuntu) |
Fix Released
|
High
|
Mate Kukri | ||
| Oracular |
Fix Released
|
High
|
Mate Kukri | ||
| grub2-signed (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
| Oracular |
Won't Fix
|
Undecided
|
Unassigned | ||
| grub2-unsigned (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
| Oracular |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
[ Impact ]
UEFI GRUB2 in Oracular Oriole enforces NX_COMPAT even when used with a non-NX shim.
Kernels in Oracular Oriole support NX_COMPAT.
The impact is limited to failing to chainload other non-NX compatible operating systems from GRUB2.
The most common such operating system is Windows 10, most installations of which do not have a NX compatible bootloader according to Microsoft.
[ Test Plan ]
1. Set up (or take an existing) machine with Ubuntu Oracular Oriole and Windows 10 in a dual boot configuration.
2. Verify that `objdump -x /boot/efi/
3. Verify that Windows 10 fails to boot via the os-prober created GRUB menu entry.
4. Update grub-efi-
5. Verify that Windows 10 successfully boots via the os-prober created GRUB menu entry.
6. Switch to the NX shim using `update-
7. Verify that Windows 10 fails to boot via the os-prober created GRUB menu entry again.
(8. If intending to use this machine, switch back to the non-NX shim using: update-alternatives --auto shimx64.efi.signed && dpkg-reconfigure shim-signed)
[ Where problems could occur ]
The patch for this only removes checks, deferring to policy enforced by shim protocol verification that is already in place, thus it should only make more things bootable not less.
When used without shim, existing and this new GRUB2 will only function with Secure Boot disabled, thus no new security problems can arise.
When used with the non-NX shim, the policy will let both non-NX and NX executables through as expected.
When used with the NX shim, the policy will only let NX executables through as expected. Only possible problem here is that if we have ever signed a pre-LF2 kernel with NX_COMPAT set in DllCharacteristics, such kernel would be let through, then use the non-NX compatible legacy loader, which will lead to an inevitable page fault.
The existence of such a kernel is exceedingly unlikely due to the upstream timeline of LF2 and NX supports, but it is a theoretical possibility and hence worth mentioning.
[ Other Info ]
n/a
| description: | updated |
| description: | updated |
| Changed in grub2 (Ubuntu): | |
| importance: | Undecided → High |
| assignee: | nobody → Mate Kukri (mkukri) |
| tags: | added: foundations-todo |
| Changed in grub2 (Ubuntu): | |
| status: | Confirmed → In Progress |
| description: | updated |
| description: | updated |
| description: | updated |
| description: | updated |

Status changed to 'Confirmed' because the bug affects multiple users.