parted crashes with invalid pointer on resizepart

Bug #1905579 reported by Marcus Furlong
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
Fix Released
Medium
Eric Desrochers
Xenial
Won't Fix
Medium
Unassigned
Bionic
Won't Fix
Medium
Unassigned
Focal
Fix Released
Medium
Eric Desrochers
Groovy
Fix Released
Medium
Eric Desrochers
Hirsute
Fix Released
Medium
Eric Desrochers

Bug Description

[Impact]

Parted is crashing (core dumping) during resize operation, while changing the end position of a partition.

[Test Case]

root@ubuntu-focal:~# parted /dev/sda resizepart 1 100%
Warning: Partition /dev/sda1 is being used. Are you sure you want to continue?
Yes/No? yes
End? [42.9GB]?
free(): invalid pointer
Aborted (core dumped)

[Where problems could occur]

As per resize documentation:
"Note that this does not modify any filesystem present in the partition."
"When growing a partition you will want to grow the filesystem afterwards"

FS-wise the resize operation won't try to take action on the FS itself. It would need to be done by the admin as a separate step.

If any problem arise, it will be limited to the resize functionality of parted. In this case, the impact would be ~ similar to the actual parted state (before this SRU), and one won't be able to resize as requested.

[Other Info]

https://git.savannah.gnu.org/cgit/parted.git/commit/?id=ca845aeeddb17343c9289816833ca352f7c0d87b

# Upstream repo:

git describe --tags ca845ae
v3.3-5-gca845ae

# Ubuntu
$ rmadison parted

 parted | 3.2-15ubuntu0.1 | xenial-updates
 parted | 3.2-20ubuntu0.2 | bionic-updates
 parted | 3.3-4 | focal
 parted | 3.3-4 | groovy
 parted | 3.3-4 | hirsute

[Original Description]
parted crashes with invalid pointer on resizepart on focal

root@ubuntu-focal:~# parted /dev/sda resizepart 1 100%
Warning: Partition /dev/sda1 is being used. Are you sure you want to continue?
Yes/No? yes
End? [42.9GB]?
free(): invalid pointer
Aborted (core dumped)

Discussion: https://<email address hidden>/msg04962.html

Fix: https://github.com/bcl/parted/commit/883813c365482d06d05a1998e066792c48156f23

description: updated
description: updated
summary: - parted crashes with invalid pointer on resizepart
+ parted crashes with invalid pointer on resizepart on focal\
summary: - parted crashes with invalid pointer on resizepart on focal\
+ parted crashes with invalid pointer on resizepart on focal
Eric Desrochers (slashd)
tags: added: seg sts
Changed in parted (Ubuntu):
assignee: nobody → Eric Desrochers (slashd)
status: New → In Progress
Eric Desrochers (slashd)
description: updated
description: updated
Eric Desrochers (slashd)
description: updated
description: updated
Changed in parted (Ubuntu Groovy):
status: New → In Progress
Changed in parted (Ubuntu Focal):
status: New → In Progress
Changed in parted (Ubuntu Bionic):
status: New → In Progress
Changed in parted (Ubuntu Xenial):
status: New → In Progress
Changed in parted (Ubuntu Bionic):
importance: Undecided → Medium
Changed in parted (Ubuntu Focal):
importance: Undecided → Medium
assignee: nobody → Eric Desrochers (slashd)
Changed in parted (Ubuntu Groovy):
importance: Undecided → Medium
assignee: nobody → Eric Desrochers (slashd)
Changed in parted (Ubuntu Hirsute):
importance: Undecided → Medium
Changed in parted (Ubuntu Xenial):
importance: Undecided → Medium
assignee: nobody → Eric Desrochers (slashd)
Changed in parted (Ubuntu Bionic):
assignee: nobody → Eric Desrochers (slashd)
Revision history for this message
Eric Desrochers (slashd) wrote : Re: parted crashes with invalid pointer on resizepart on focal

[sts-sponsors]

Uploaded in active development release (hirsute).
I'll go ahead with the SRU once the package is foundin hirsute-releases.

- Eric

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

This bug was fixed in the package parted - 3.3-4ubuntu1

---------------
parted (3.3-4ubuntu1) hirsute; urgency=medium

  * d/p/fix-end-input-usage-in-do-resizepart.patch:
    - Fix end_input usage in do_resizepart (LP: #1905579)

 -- Eric Desrochers <email address hidden> Mon, 30 Nov 2020 12:44:29 -0500

Changed in parted (Ubuntu Hirsute):
status: In Progress → Fix Released
Revision history for this message
Eric Desrochers (slashd) wrote :

Xenial and Bionic doesn't have such end_input pointer in do_resizepart().

Changed in parted (Ubuntu Bionic):
status: In Progress → Won't Fix
Changed in parted (Ubuntu Xenial):
status: In Progress → Won't Fix
Revision history for this message
Eric Desrochers (slashd) wrote :

[sts-sponsors]

Uplaoded in Groovy and Focal. It is now waiting for the SRU team to approve the upload for the package to start building in -proposed to officially start the testing phase.

- Eric

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Marcus, or anyone else affected,

Accepted parted into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/parted/3.3-4ubuntu0.20.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in parted (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Changed in parted (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Marcus, or anyone else affected,

Accepted parted into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/parted/3.3-4ubuntu0.20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Eric Desrochers (slashd)
summary: - parted crashes with invalid pointer on resizepart on focal
+ parted crashes with invalid pointer on resizepart
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION GROOVY]

I have tested with the package currently found in groovy-proposed, and I confirmed the package '3.3-4ubuntu0.20.10.1' fixes the free() invalid pointer problem during a resize partition operation.

tags: added: verification-done-groovy
removed: verification-needed-groovy
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION FOCAL]

I have tested with the package currently found in focal-proposed, and I confirmed the package '3.3-4ubuntu0.20.04.1' fixes the free() invalid pointer problem during a resize partition operation.

Revision history for this message
Marcus Furlong (furlongm) wrote :

Confirmed that it fixed the issue on focal for me.

Revision history for this message
Eric Desrochers (slashd) wrote :

Thanks, Marcus, for your time testing the 'parted' proposed package in focal.

- Eric

tags: added: verification-dome-focal
removed: verification-needed-focal
tags: added: verification-done-focal
removed: verification-dome-focal
Eric Desrochers (slashd)
Changed in parted (Ubuntu Bionic):
assignee: Eric Desrochers (slashd) → nobody
Changed in parted (Ubuntu Xenial):
assignee: Eric Desrochers (slashd) → nobody
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for parted has completed successfully and the package is now being 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.

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

This bug was fixed in the package parted - 3.3-4ubuntu0.20.10.1

---------------
parted (3.3-4ubuntu0.20.10.1) groovy; urgency=medium

  * d/p/fix-end-input-usage-in-do-resizepart.patch:
    - Fix end_input usage in do_resizepart (LP: #1905579)

 -- Eric Desrochers <email address hidden> Tue, 01 Dec 2020 10:27:07 -0500

Changed in parted (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package parted - 3.3-4ubuntu0.20.04.1

---------------
parted (3.3-4ubuntu0.20.04.1) focal; urgency=medium

  * d/p/fix-end-input-usage-in-do-resizepart.patch:
    - Fix end_input usage in do_resizepart (LP: #1905579)

 -- Eric Desrochers <email address hidden> Tue, 01 Dec 2020 10:18:05 -0500

Changed in parted (Ubuntu Focal):
status: Fix Committed → 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.