using progress mod w/ net files crashes
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | grub2 (Ubuntu) |
Medium
|
Mathieu Trudel-Lapierre | ||
| | Trusty |
Medium
|
Unassigned | ||
| | Vivid |
Medium
|
Unassigned | ||
| | Wily |
Medium
|
Mathieu Trudel-Lapierre | ||
Bug Description
[Impact]
If the progress module is loaded, GRUB will crash when loading files over the network. A common scenario where this occurs is when building a GRUB image for EFI netbooting w/ all modules included. MAAS does this when generating it's grubnet EFI binary. MAAS currently works around this by explicitly blacklisting the progress module - but only on arm64 (we'd only observed this on arm64 at the time, and didn't yet know the root cause).
While the easy workaround is to just omit the progress module, it isn't at all obvious from the crash that progress.mod is the cause.
[Test Case]
The simple case is to create a grub image with *just* the progress module and netboot it. For arm64:
$ grub-mkimage -v -o grubaa64.efi -O arm64-efi -d /home/dannf/
Booting the resulting image:
[1] PXE
[2] ubuntu
[3] Shell
[4] Boot Manager
Start: 1
..
Synchronous Exception at 0x0000000FF7C3DDC8
Synchronous Exception at 0x0000000FF7C3DDC8
Synchronous Exception at 0x0000000FF7C3DDC8
Synchronous Exception at 0x0000000FF7C3DDC8
[...]
[Regression Risk]
The upstream fix for this is a pretty surgical fix to check for NULL before dereferencing a pointer.
| dann frazier (dannf) wrote : | #1 |
| tags: | added: patch |
| summary: |
- arm64 images built w/ the progress module crash GRUB + crash when progress mod used w/ net files |
| summary: |
- crash when progress mod used w/ net files + using progress mod w/ net files crashes |
| description: | updated |
| Changed in grub2 (Ubuntu Wily): | |
| status: | New → In Progress |
| importance: | Undecided → Medium |
| assignee: | nobody → Mathieu Trudel-Lapierre (mathieu-tl) |
This bug was fixed in the package grub2 - 2.02~beta2-29
---------------
grub2 (2.02~beta2-29) unstable; urgency=medium
[ Linn Crosetto ]
* Clean up docs, mpi, and other files (closes: #798607).
[ dann frazier ]
* progress: avoid NULL dereference for net files. (LP: #1459872)
-- Colin Watson <email address hidden> Tue, 13 Oct 2015 23:36:46 +0100
| Changed in grub2 (Ubuntu): | |
| status: | In Progress → Fix Released |
| Changed in grub2 (Ubuntu Wily): | |
| status: | Fix Released → Fix Committed |
| Launchpad Janitor (janitor) wrote : | #3 |
This bug was fixed in the package grub2 - 2.02~beta2-29
---------------
grub2 (2.02~beta2-29) unstable; urgency=medium
[ Linn Crosetto ]
* Clean up docs, mpi, and other files (closes: #798607).
[ dann frazier ]
* progress: avoid NULL dereference for net files. (LP: #1459872)
-- Colin Watson <email address hidden> Tue, 13 Oct 2015 23:36:46 +0100
| Changed in grub2 (Ubuntu Wily): | |
| status: | Fix Committed → Fix Released |
| Changed in grub2 (Ubuntu Trusty): | |
| importance: | Undecided → Medium |
| Changed in grub2 (Ubuntu Vivid): | |
| importance: | Undecided → Medium |
| tags: | added: trusty |
| Sebastien Bacher (seb128) wrote : | #4 |
(unsubscribing sponsors, Mathieu is dealing with it)
Hello dann, or anyone else affected,
Accepted grub2 into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in grub2 (Ubuntu Trusty): | |
| status: | New → Fix Committed |
| tags: | added: verification-needed |
| Steve Langasek (vorlon) wrote : | #6 |
Hello dann, or anyone else affected,
Accepted grub2 into vivid-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in grub2 (Ubuntu Vivid): | |
| status: | New → Fix Committed |
| Chris J Arges (arges) wrote : | #7 |
Hello dann, or anyone else affected,
Accepted grub2-signed into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Chris J Arges (arges) wrote : | #8 |
Hello dann, or anyone else affected,
Accepted grub2-signed into vivid-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| dann frazier (dannf) wrote : | #9 |
I've verified this by creating a maas-capable grub image from the update and verified that it works (and I even see progress info now!)
| tags: |
added: verification-done removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #10 |
This bug was fixed in the package grub2 - 2.02~beta2-
---------------
grub2 (2.02~beta2-
* d/p/arm64-
booting arm64 kernels on certain UEFI implementations. (LP: #1476882)
* progress: avoid NULL dereference for net files. (LP: #1459872)
* arm64/setjmp: Add missing license macro. (LP: #1459871)
* Cherry-pick patch to add SAS disks to the device list from the ofdisk
module. (LP: #1517586)
* Cherry-pick patch to open Simple Network Protocol exclusively.
(LP: #1508893)
-- dann frazier <email address hidden> Wed, 25 Nov 2015 13:13:35 -0700
| Changed in grub2 (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
The verification of the Stable Release Update for grub2 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
Hello dann, or anyone else affected,
Accepted grub2 into vivid-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| tags: | removed: verification-done |
| tags: | added: verification-needed |
| Chris J Arges (arges) wrote : | #13 |
Hello dann, or anyone else affected,
Accepted grub2-signed into vivid-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| tags: |
added: verification-done verification-vivid-done removed: verification-needed |
| tags: |
added: verification-done-vivid removed: verification-vivid-done |
| Launchpad Janitor (janitor) wrote : | #14 |
This bug was fixed in the package grub2 - 2.02~beta2-
---------------
grub2 (2.02~beta2-
* Merge in changes from 2.02~beta2-
- d/p/arm64-
booting arm64 kernels on certain UEFI implementations. (LP: #1476882)
- progress: avoid NULL dereference for net files. (LP: #1459872)
- arm64/setjmp: Add missing license macro. (LP: #1459871)
- Cherry-pick patch to add SAS disks to the device list from the ofdisk
module. (LP: #1517586)
- Cherry-pick patch to open Simple Network Protocol exclusively.
(LP: #1508893)
* Cherry-picks to better handle TFTP timeouts on some arches: (LP: #1521612)
- (7b386b7) efidisk: move device path helpers in core for efinet
- (c52ae40) efinet: skip virtual IP devices when enumerating cards
- (f348aee) efinet: enable hardware filters when opening interface
* Update quick boot logic to handle abstractions for which there is no
write support. (LP: #1274320)
-- dann frazier <email address hidden> Wed, 16 Dec 2015 13:31:15 -0700
| Changed in grub2 (Ubuntu Vivid): | |
| status: | Fix Committed → Fix Released |


The attached patch fixes the problem for me. I'll try and upstream it, though a pure upstream build is crashing elsewhere for me at the moment.