grub-probe: double free or corruption in some rare cases

Bug #1330963 reported by Vladimir Smirnov
68
This bug affects 10 people
Affects Status Importance Assigned to Milestone
grub
Unknown
Unknown
grub2 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

There is small bug in grub2 in trusty, that causing grub-probe to fail in some rare cases.
I've got system with follwing scheme:
GPT (4 HDD):
1) 128MB Free space, bios_boot flag
2) MDADM RAID10, /boot, ext3
3) MDADM RAID10, LVM vg0 (for /, /home, etc)
4) MDADM RAID10, LVM vg1 (data partitions).

In this case grub fails with:
glibc detected *** ./grub-probe: double free or corruption (fasttop): 0x0000000000838760 ***

Cause of this behavior is grub-core/disk/diskfilter.c:886.

I've also filed a bug upstream: http://savannah.gnu.org/bugs/?41582
but it's still not closed and bug is present in Ubuntu 14.04.

I'm attaching my vision of fixing this bug here. Thoguh, there maybe a better way to fix this.

Related branches

Revision history for this message
Vladimir Smirnov (civilian) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-Fix-double-free-when-using-LVM.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in grub2 (Ubuntu):
status: New → Confirmed
Changed in grub2 (Ubuntu):
importance: Undecided → High
tags: added: trusty
tags: added: rls-u-incoming
Revision history for this message
Toni Förster (stonerl) wrote :

Just one question, is this going to be addressed in trusty? Upstream has fixed this, already: http://savannah.gnu.org/bugs/?41582#comment5

Revision history for this message
Toni Förster (stonerl) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02~beta2-25

---------------
grub2 (2.02~beta2-25) unstable; urgency=medium

  * Build-depend on dosfstools and mtools on arm64 as well as amd64.

 -- Colin Watson <email address hidden> Fri, 12 Jun 2015 12:29:19 +0100

Changed in grub2 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.