apt-get crashed with SIGSEGV in Name()

Bug #939867 reported by toobuntu
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released

Bug Description


ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: apt 0.8.16~exp12ubuntu4
ProcVersionSignature: Ubuntu 3.2.0-17.26-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
ApportVersion: 1.92-0ubuntu1
Architecture: amd64
CasperVersion: 1.304
Date: Thu Feb 23 16:21:35 2012
ExecutablePath: /usr/bin/apt-get
LiveMediaBuild: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120220)
ProcCmdline: apt-get dist-upgrade
 PATH=(custom, no user)
 Segfault happened at: 0x7f9da2a1d680 <_ZN9pkgDPkgPM17WriteApportReportEPKcS1_+4992>: mov (%rax),%eax
 PC (0x7f9da2a1d680) ok
 source "(%rax)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: apt
 pkgDPkgPM::WriteApportReport(char const*, char const*) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
 pkgDPkgPM::ProcessDpkgStatusLine(int, char*) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
 pkgDPkgPM::DoDpkgStatusFd(int, int) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
 pkgDPkgPM::Go(int) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
 pkgPackageManager::DoInstallPostFork(int) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12
Title: apt-get crashed with SIGSEGV in pkgDPkgPM::WriteApportReport()
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

CVE References

Revision history for this message
toobuntu (toobuntu) wrote :
visibility: private → public
Revision history for this message
Apport retracing service (apport) wrote :

 Name (this=<optimized out>) at ../build/include/apt-pkg/cacheiterators.h:157
 pkgDPkgPM::WriteApportReport (this=0x1b8b5c0, pkgpath=<optimized out>, errormsg=<optimized out>) at deb/dpkgpm.cc:1637
 pkgDPkgPM::ProcessDpkgStatusLine (this=0x1b8b5c0, OutStatusFd=-1, line=<optimized out>) at deb/dpkgpm.cc:554
 pkgDPkgPM::DoDpkgStatusFd (this=0x1b8b5c0, statusfd=<optimized out>, OutStatusFd=-1) at deb/dpkgpm.cc:667
 pkgDPkgPM::Go (this=<optimized out>, OutStatusFd=-1) at deb/dpkgpm.cc:1357

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in apt (Ubuntu):
importance: Undecided → Medium
summary: - apt-get crashed with SIGSEGV in pkgDPkgPM::WriteApportReport()
+ apt-get crashed with SIGSEGV in Name()
tags: removed: need-amd64-retrace
Revision history for this message
Torsten Spindler (tspindler) wrote :

In dpkgpm.cc the crash happens in a loop over a list. Each list item ought to have a Pkg associated with it, but if that's not the case, this crash might happen. It would be best to check if (*I).Pkg is of the right type, the attached patch only checks for NULL.

Changed in apt (Ubuntu):
status: New → Triaged
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "apt_apport-nullcheck.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Michael Vogt (mvo)
Changed in apt (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (22.3 KiB)

This bug was fixed in the package apt - 0.9.6ubuntu1

apt (0.9.6ubuntu1) quantal-proposed; urgency=low

  [ Michael Vogt ]
  * merged from Debian, remaining changes:
    - use ubuntu keyring and ubuntu archive keyring in apt-key
    - run update-apt-xapian-index in apt.cron
    - support apt-key net-update and verify keys against master-keyring
    - run apt-key net-update in cron.daily
    - different example sources.list
    - APT::pkgPackageManager::MaxLoopCount set to 5000
    - apport pkgfailure handling
    - ubuntu changelog download handling
    - patch for apt cross-building, see http://bugs.debian.org/666772

  [ Steve Langasek ]
  * Drop upgrade handling for obsolete conffile /etc/apt/apt.conf.d/01ubuntu,
    removed in previous LTS.
  * prepare-release: declare the packages needed as source build deps.

apt (0.9.6) unstable; urgency=low

  [ David Kalnischkies ]
  * apt-pkg/cdrom.cc:
    - fix regression from 0.9.3 which dumped the main configuration
      _config instead of the cdrom settings (Cnf) as identified and
      tested by Milan Kupcevic, thanks! (Closes: #674100)
  * cmdline/apt-get.cc:
    - do not show 'list of broken packages' header if no package
      is broken as it happens e.g. for external resolver errors
    - print URIs for all changelogs in case of --print-uris,
      thanks to Daniel Hartwig for the patch! (Closes: #674897)
    - show 'bzr branch' as 'bzr get' is deprecated (LP: #1011032)
    - check build-dep candidate if install is forbidden
  * debian/apt-utils.links:
    - the internal resolver 'apt' is now directly installed in
      /usr/lib/apt/solvers, so don't instruct dh to create a broken link
  * doc/apt-verbatim.ent:
    - APT doesn't belong to the product 'Linux', so use 'APT' instead
      as after all APT is a big suite of applications
  * doc/examples/sources.list:
    - use the codename instead of 'stable' in the examples sources.list
      as we do in the manpage and as the debian-installer does
  * doc/apt-get.8.xml:
    - use apt-utils as package example instead of libc6
  * apt-pkg/contrib/cmdline.cc:
    - apply patch from Daniel Hartwig to fix a segfault in case
      the LongOpt is empty (Closes: #676331)
    - fix segfault with empty LongOpt in --no-* branch
  * ftparchive/apt-ftparchive.cc:
    - default to putting the Contents-* files below $(SECTION) as apt-file
      expects them there - thanks Martin-Éric Racine! (Closes: #675827)
  * apt-pkg/deb/deblistparser.cc:
    - set pkgCacheGen::Essential to "all" again (Closes: #675449)
  * apt-pkg/algorithms.cc:
    - force install only for one essential package out of a group
  * apt-pkg/aptconfiguration.cc:
    - if APT::Languages=none save "none" in allCodes so that the detected
      configuration is cached as intended (Closes: #674690, LP: #1004947)
  * apt-pkg/cacheiterators.h:
    - add an IsMultiArchImplicit() method for Dep- and PrvIterator

  [ Justin B Rye ]
  * doc/apt-cdrom.8.xml:
    - replace CDROM with the proper CD-ROM in text
    - correct disc vs. disk issues
  * doc/apt-extracttemplates.1.xml:
    - debconf is not DebConf
  * doc/apt-get.8.xml:
    - move dselect-upgrade below dist-upgrade
    - rev...

Changed in apt (Ubuntu):
status: In Progress → 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.