qemu-img segmentation fault when asking for options

Bug #1388036 reported by Neil Wilson on 2014-10-31
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu-kvm (Ubuntu)
Medium
Unassigned
Precise
Medium
Unassigned

Bug Description

================================================
Impact: qemu-img segfaults
Test case: qemu-img convert -O qcow2 -o ? a b
Regression potential: this only ensures that data is initialized before we call a fn dereferencing it. Any regressions will be localized to qemu-img.
================================================

When you ask for options for a command on the precise version of qemu-img

qemu-img convert -O qcow2 -o ? a b

The tool seg faults:

Supported options:
size Virtual disk size
backing_file File name of a base image
backing_fmt Image format of the base image
encryption Encrypt the image
cluster_size qcow2 cluster size
preallocation Preallocation mode (allowed values: off, metadata)
Segmentation fault (core dumped)

This is fixed upstream in later versions, but may be worth backporting to precise.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: qemu-utils 1.0+noroms-0ubuntu14.18
ProcVersionSignature: Ubuntu 3.2.0-65.98-generic 3.2.60
Uname: Linux 3.2.0-65-generic i686
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: i386
Date: Fri Oct 31 10:41:52 2014
MarkForUpload: True
SourcePackage: qemu-kvm
UpgradeStatus: No upgrade log present (probably fresh install)

Neil Wilson (neil-aldur) wrote :

Hi,

I can't actually reproduce this on my precise server. Could you please
show the full, precise set of commands you used starting with an empty
directory?

 status: incomplete

Changed in qemu-kvm (Ubuntu):
status: New → Incomplete
Neil Wilson (neil-aldur) wrote :

Build from current-cloud image

com.ubuntu.cloud:released:download/com.ubuntu.cloud:server:12.04:i386/20140927/disk1.img
com.ubuntu.cloud:released:download/com.ubuntu.cloud:server:12.04:amd64/20140927/disk1.img

sudo apt-get update
sudo apt-get install language-pack-en qemu-utils
qemu-img convert -O qcow2 -o ? a b

(Note, not as root).

On 3 November 2014 16:01, Serge Hallyn <email address hidden> wrote:

> Hi,
>
> I can't actually reproduce this on my precise server. Could you please
> show the full, precise set of commands you used starting with an empty
> directory?
>
> status: incomplete
>
>
> ** Changed in: qemu-kvm (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1388036
>
> Title:
> qemu-img segmentation fault when asking for options
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/1388036/+subscriptions
>

--
Neil Wilson

Serge Hallyn (serge-hallyn) wrote :

Thanks! Brilliant example of how assumptions can interfere with bug
reproductions. I had never tried with 'a' not existing. That appears
to be the trigger.

Changed in qemu-kvm (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Fix Released
Changed in qemu-kvm (Ubuntu Precise):
importance: Undecided → Medium
status: New → Triaged
description: updated

Hello Neil, or anyone else affected,

Accepted qemu-kvm into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/qemu-kvm/1.0+noroms-0ubuntu14.20 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 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, 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-failed. In either case, details of your testing will help us make a better decision.

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

Changed in qemu-kvm (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Neil Wilson (neil-aldur) wrote :

ubuntu@srv-puxvl:~$ uname -a
Linux srv-puxvl 3.2.0-70-virtual #105-Ubuntu SMP Wed Sep 24 20:06:46 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@srv-puxvl:~$ dpkg -s qemu-utils | grep Version
Version: 1.0+noroms-0ubuntu14.20
ubuntu@srv-puxvl:~$ qemu-img convert -O qcow2 -o ? a b
Supported options:
size Virtual disk size
backing_file File name of a base image
backing_fmt Image format of the base image
encryption Encrypt the image
cluster_size qcow2 cluster size
preallocation Preallocation mode (allowed values: off, metadata)
ubuntu@srv-puxvl:~$ sudo qemu-img convert -O qcow2 -o ? a b
Supported options:
size Virtual disk size
backing_file File name of a base image
backing_fmt Image format of the base image
encryption Encrypt the image
cluster_size qcow2 cluster size
preallocation Preallocation mode (allowed values: off, metadata)

The fix corrects the segmentation fault.

Neil Wilson (neil-aldur) wrote :

ubuntu@srv-3wzed:~$ uname -a
Linux srv-3wzed 3.2.0-69-virtual #103-Ubuntu SMP Tue Sep 2 05:28:41 UTC 2014 i686 i686 i386 GNU/Linux

ubuntu@srv-3wzed:~$ dpkg -s qemu-utils | grep Version
Version: 1.0+noroms-0ubuntu14.20
ubuntu@srv-3wzed:~$ qemu-img convert -O qcow2 -o ? a b
Supported options:
size Virtual disk size
backing_file File name of a base image
backing_fmt Image format of the base image
encryption Encrypt the image
cluster_size qcow2 cluster size
preallocation Preallocation mode (allowed values: off, metadata)
ubuntu@srv-3wzed:~$ sudo qemu-img convert -O qcow2 -o ? a b
Supported options:
size Virtual disk size
backing_file File name of a base image
backing_fmt Image format of the base image
encryption Encrypt the image
cluster_size qcow2 cluster size
preallocation Preallocation mode (allowed values: off, metadata)

Also fixed on i686 version.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu-kvm - 1.0+noroms-0ubuntu14.20

---------------
qemu-kvm (1.0+noroms-0ubuntu14.20) precise-proposed; urgency=medium

  * Fix segfault on qemu-img convert with nonexistent source file (LP: #1388036)
 -- Serge Hallyn <email address hidden> Thu, 20 Nov 2014 10:11:21 -0600

Changed in qemu-kvm (Ubuntu Precise):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for qemu-kvm 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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers