Bug 2368945 - Null pointer dereference in grub-core\loader\efi\chainloader.c
Summary: Null pointer dereference in grub-core\loader\efi\chainloader.c
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nicolas Frayer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-28 12:22 UTC by Thomas Frauendorfer
Modified: 2025-06-24 01:05 UTC (History)
5 users (show)

Fixed In Version: grub2-2.12-32.fc42 grub2-2.12-25.fc41
Clone Of:
Environment:
Last Closed: 2025-06-21 01:27:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch fixing the problem (1.06 KB, application/mbox)
2025-05-28 12:23 UTC, Thomas Frauendorfer
no flags Details
Patch v2 (1.22 KB, application/mbox)
2025-05-28 16:00 UTC, Thomas Frauendorfer
no flags Details

Description Thomas Frauendorfer 2025-05-28 12:22:10 UTC
Commit "Allow chainloadeing EFI apps from loop mounts" accesses dev->disk->dev to check if the disk is a loopback device.
If grub is booted through network then dev->disk is NULL but the code does not check for that.


Reproducible: Always

Comment 1 Thomas Frauendorfer 2025-05-28 12:23:07 UTC
Created attachment 2091899 [details]
Patch fixing the problem

Comment 2 Nicolas Frayer 2025-05-28 15:30:09 UTC
Hi Thomas,

Thanks for reporting this as well as the patch.
Can you please reformat the commit message (shorter description maybe expand it in the message body).
Please add a Signed-off-by and also a Reviewed-by: Nicolas Frayer <nfrayer>

Regards,

Nicolas

Comment 3 Thomas Frauendorfer 2025-05-28 16:00:48 UTC
Created attachment 2091930 [details]
Patch v2

Adjusted commit message
Added signed-off and reviewd-by

Comment 4 Fedora Update System 2025-06-17 16:56:46 UTC
FEDORA-2025-b0ae534a31 (grub2-2.12-32.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-b0ae534a31

Comment 5 Fedora Update System 2025-06-19 01:43:29 UTC
FEDORA-2025-b0ae534a31 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-b0ae534a31`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-b0ae534a31

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2025-06-19 13:34:32 UTC
FEDORA-2025-eb145f3cb9 (grub2-2.12-25.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-eb145f3cb9

Comment 7 Fedora Update System 2025-06-21 01:27:29 UTC
FEDORA-2025-b0ae534a31 (grub2-2.12-32.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2025-06-21 02:24:12 UTC
FEDORA-2025-eb145f3cb9 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-eb145f3cb9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-eb145f3cb9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2025-06-24 01:05:08 UTC
FEDORA-2025-eb145f3cb9 (grub2-2.12-25.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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