Your message dated Tue, 16 Aug 2005 21:17:04 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#322595: fixed in dpkg 1.13.11
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 11 Aug 2005 17:17:56 +0000
>From [EMAIL PROTECTED] Thu Aug 11 10:17:56 2005
Return-path: <[EMAIL PROTECTED]>
Received: from mail.metronet.co.uk [213.162.97.75] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1E3Ggg-00079S-00; Thu, 11 Aug 2005 10:17:51 -0700
Received: from riva.pelham.vpn.ucam.org 
(83-216-156-196.colinw664.adsl.metronet.co.uk [83.216.156.196])
        by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id C509A4152D7
        for <[EMAIL PROTECTED]>; Thu, 11 Aug 2005 18:17:05 +0100 (BST)
Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 
(Debian))
        for [EMAIL PROTECTED]
        id 1E3GgA-0001e7-00; Thu, 11 Aug 2005 18:17:18 +0100
Date: Thu, 11 Aug 2005 18:17:18 +0100
From: Colin Watson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [SEGFAULT] when unpacking package unversioned-Replaced by another 
package unpacked in same run
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
        protocol="application/pgp-signature"; boundary="3uo+9/B/ebqu+fSQ"
Content-Disposition: inline
User-Agent: Mutt/1.5.9i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
        version=2.60-bugs.debian.org_2005_01_02


--3uo+9/B/ebqu+fSQ
Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3"
Content-Disposition: inline


--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: dpkg
Version: 1.3.10
Severity: important
Tags: patch

dpkg segfaults when attempting to unpack a package which has an
unversioned Replaces declared on it by another package that was unpacked
in the same dpkg run. We encountered this in Ubuntu as:

  https://bugzilla.ubuntu.com/show_bug.cgi?id=3D13306

  Selecting previously deselected package x11proto-gl-dev.
  Unpacking x11proto-gl-dev (from .../x11proto-gl-dev_1.4+cvs.20050524-3_al=
l.deb) ...
  [...]
  Selecting previously deselected package libglu1-mesa-dev.
  Unpacking libglu1-mesa-dev (from .../libglu1-mesa-dev_6.2.1-5ubuntu4_i386=
=2Edeb) ...
  dpkg-deb: subprocess paste killed by signal (Broken pipe)
  E: Sub-process /usr/bin/dpkg received a segmentation fault.

The tail of a -D7777 log looks like this:

  D000010: tarobject ti->Name=3D`./usr/include/GL/glu.h' Mode=3D644 owner=
=3D0.0 Type=3D48(-) ti->LinkName=3D`' namenode=3D`/usr/include/GL/glu.h' fl=
ags=3D2 instead=3D`<none>'
  D000100: setupvnamevbs main=3D`/usr/include/GL/glu.h' tmp=3D`/usr/include=
/GL/glu.h.dpkg-tmp' new=3D`/usr/include/GL/glu.h.dpkg-new'
  D000100: tarobject already exists
  D000010: tarobject ... found in x11proto-gl-dev
  D000040: does_replace new=3Dlibglu1-mesa-dev old=3Dx11proto-gl-dev (0:1.4=
+cvs.20050524-3)
  D000040: does_replace ... no
  D000040: does_replace new=3Dx11proto-gl-dev old=3Dlibglu1-mesa-dev (0:6.2=
=2E1-5ubuntu5)
  E: Sub-process /usr/bin/dpkg received a segmentation fault.

I attached gdb, set a breakpoint in does_replace, and found that
dep->list->version was garbage:

    debug(dbg_depcondetail,"does_replace ... found old, version %s",
          versiondescribe(&dep->list->version,vdew_always));

  (gdb) p dep->list->version
  $31 =3D {epoch =3D 268361688, version =3D 0x696e6520 <Address 0x696e6520 =
out of bounds>, revision =3D 0x58496e70 <Address 0x58496e70 out of bounds>}

The Replaces line being inspected was:

  Replaces: xlibmesa-gl-dev (<< 6.8.2-19), xlibmesa-glu-dev (<< 6.8.2-19), =
libglu-dev-xorg (<< 6.8.2-19), mesag-dev, libglu1-mesa-dev

As it happens, everything else that checks the version field first
checks that verrel !=3D dvr_none, so nothing else except for the debug
message was running into this uninitialised memory. I tracked it down to
this code in process_archive, which neglects to initialise memory if
verrel =3D=3D dvr_none (unlike the database-parsing code in f_dependency,
which blanks the version in that case):

      newpossi->verrel=3D possi->verrel;
      if (possi->verrel !=3D dvr_none) newpossi->version=3D possi->version;

I've fixed this bug in my archive. Please sync with it. The patch is
also attached here.

  [EMAIL PROTECTED]/dpkg--replaces-crash--1.13
  http://people.ubuntu.com/~cjwatson/archives/[EMAIL PROTECTED]
005

Thanks,

--=20
Colin Watson                                       [EMAIL PROTECTED]

--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="replaces-crash.patch"
Content-Transfer-Encoding: quoted-printable

* finding or making [EMAIL PROTECTED]/dpkg--replaces-crash--=
1.13--base-0
* finding or making [EMAIL PROTECTED]/dpkg--replaces-crash--=
1.13--patch-1
* auto-adding [EMAIL PROTECTED]/dpkg--replaces-crash--1.13--=
patch-1 to greedy revision library /home/cjwatson/.arch-revlib
* computing changeset
A  {arch}/dpkg/dpkg--replaces-crash/dpkg--replaces-crash--1.13/colin.watson=
@canonical.com--2005/patch-log/patch-1
M  src/processarc.c
M  debian/changelog
M  ChangeLog
* changeset report
* modified files

--- orig/ChangeLog
+++ mod/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-11  Colin Watson  <[EMAIL PROTECTED]>
+
+       * src/processarc.c: When copying the forward dependency tree, blank
+       the version field of unversioned dependencies rather than leaving
+       them uninitialised.
+
 2005-06-28  Scott James Remnant  <[EMAIL PROTECTED]>
=20
        * configure.ac: Bump version to 1.13.11~.


--- orig/debian/changelog
+++ mod/debian/changelog
@@ -1,6 +1,10 @@
 dpkg (1.13.11~) unstable; urgency=3Dlow
=20
-  *=20
+  * When copying the forward dependency tree on unpack, blank the version
+    field of unversioned dependencies rather than leaving them
+    uninitialised.  Fixes crash when unpacking a package which has an
+    unversioned Replaces declared on it by another package previously
+    unpacked in the same run.
=20
  --
=20


--- orig/src/processarc.c
+++ mod/src/processarc.c
@@ -781,7 +781,10 @@
       newpossi->ed=3D possi->ed;
       newpossi->next=3D 0; newpossi->nextrev=3D newpossi->backrev=3D 0;
       newpossi->verrel=3D possi->verrel;
-      if (possi->verrel !=3D dvr_none) newpossi->version=3D possi->version;
+      if (possi->verrel !=3D dvr_none)
+        newpossi->version=3D possi->version;
+      else
+        blankversion(&newpossi->version);
       newpossi->cyclebreak=3D 0;
       *newpossilastp=3D newpossi;
       newpossilastp=3D &newpossi->next;



* added files

--- /dev/null
+++ mod/{arch}/dpkg/dpkg--replaces-crash/dpkg--replaces-crash--1.13/colin.w=
[EMAIL PROTECTED]/patch-log/patch-1
@@ -0,0 +1,13 @@
+Revision: dpkg--replaces-crash--1.13--patch-1
+Archive: [EMAIL PROTECTED]
+Creator: Colin Watson <[EMAIL PROTECTED]>
+Date: Thu Aug 11 18:01:49 BST 2005
+Standard-date: 2005-08-11 17:01:49 GMT
+Modified-files: ChangeLog debian/changelog src/processarc.c
+New-patches: [EMAIL PROTECTED]/dpkg--replaces-crash--1.13--=
patch-1
+Summary: fix crash when checking unversioned Replaces
+Keywords: segfault
+
+* src/processarc.c: When copying the forward dependency tree, blank
+the version field of unversioned dependencies rather than leaving
+them uninitialised.


--BOKacYhQ+x31HxR3--

--3uo+9/B/ebqu+fSQ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Colin Watson <[EMAIL PROTECTED]> -- Debian developer

iD8DBQFC+4ge9t0zAhD6TNERAn5JAJ479Hw/E6zJk4WUJOqsc4rGI2bOZgCePO8k
hwXBh8UF6/6FOpoE+kJVY2Q=
=0p5G
-----END PGP SIGNATURE-----

--3uo+9/B/ebqu+fSQ--

---------------------------------------
Received: (at 322595-close) by bugs.debian.org; 17 Aug 2005 04:20:15 +0000
>From [EMAIL PROTECTED] Tue Aug 16 21:20:15 2005
Return-path: <[EMAIL PROTECTED]>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
        id 1E5FMO-00017T-00; Tue, 16 Aug 2005 21:17:04 -0700
From: Scott James Remnant <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.56 $
Subject: Bug#322595: fixed in dpkg 1.13.11
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Tue, 16 Aug 2005 21:17:04 -0700
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 37

Source: dpkg
Source-Version: 1.13.11

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive:

dpkg-dev_1.13.11_all.deb
  to pool/main/d/dpkg/dpkg-dev_1.13.11_all.deb
dpkg_1.13.11.dsc
  to pool/main/d/dpkg/dpkg_1.13.11.dsc
dpkg_1.13.11.tar.gz
  to pool/main/d/dpkg/dpkg_1.13.11.tar.gz
dpkg_1.13.11_i386.deb
  to pool/main/d/dpkg/dpkg_1.13.11_i386.deb
dselect_1.13.11_i386.deb
  to pool/main/d/dpkg/dselect_1.13.11_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Scott James Remnant <[EMAIL PROTECTED]> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 17 Aug 2005 04:44:44 +0100
Source: dpkg
Binary: dpkg dselect dpkg-dev
Architecture: source i386 all
Version: 1.13.11
Distribution: unstable
Urgency: low
Maintainer: Scott James Remnant <[EMAIL PROTECTED]>
Changed-By: Scott James Remnant <[EMAIL PROTECTED]>
Description: 
 dpkg       - package maintenance system for Debian
 dpkg-dev   - package building tools for Debian
 dselect    - user tool to manage Debian packages
Closes: 5571 47404 57194 82407 95570 113626 121173 147574 151651 156319 169928 
170869 171762 201848 236733 268639 273489 296026 302229 306474 306874 310306 
310390 316470 317760 317770 318376 318473 318659 318745 319781 319784 319816 
320925 320952 322359 322361 322362 322595 322917
Changes: 
 dpkg (1.13.11) unstable; urgency=low
 .
   The "Good, clean fun" Release.
 .
   * Fixed the always broken error handling so that only the intended
     cleanup handlers are run, rather than ones that we didn't expect.
     This corrects the bug when a package's postrm fails and the package is
     left in an installed state with no files; the package will now be left
     in a half-installed state, as originally intended.  Found by Marga
     Manterola while documenting the maintainer scripts.  Closes: #296026.
   * Fixed removal of files involved in diversions during upgrade, caused by
     checking whether the "directory" was in use by another package without
     actually checking whether or not it was a directory.  Closes: #310390.
   * Fixed package saving to not disappear packages who divert anything from
     the installing package out of the way.  Closes: #113626.
   * Improved clean-up of unpack failure during install or upgrade, to leave
     the system in exactly the same state as it started in.
     Closes: #47404, #82407, #121173, #170869, #201848, #236733, #268639.
   * Fixed crash when unpacking a package which has an unversioned Replaces
     declared on it by another package previously unpacked in the same run
     (Colin Watson).  Closes: #322595.
 .
   * New install unwinding fixed to ensure we don't leave a version in the
     status db for a not-installed package.
   * Corrected error call when encountering a corrupted filesystem tarfile
     to not print "Success".  Closes: #95570.
   * Fixed castration of potentially unsafe devices to not follow symlinks.
     Closes: #169928.
   * Marked log file descriptor as close-on-exec.  Closes: #320925.
   * Re-worked dpkg-source -x to allow all manner of strange things maintainers
     seem to do, unpacking isn't the right place to enforce sanity; we'll
     do it in -b later on >:-).  Closes: #316470, #317760, #318473, #318745,
     #322359, #322361, #322362.
 .
   * Corrected dselect synopsis line to match consensus.  Closes: #318659.
   * Changed dpkg-name to use a shell redirect rather than the /dev/stderr
     device that may not be writable.  Closes: #318376.
   * Adjusted various dpkg-query options to avoid outputting a trailing
     newline.  Closes: #151651, #319781.
   * Changed references to "statusoverride" file to just "statoverride"
     to make it match reality.  Closes: #320952.
   * Fixed several bugs with the default diff ignore list used by dpkg-source.
   * Added ,,* to the list of default diff ignore list.  Closes: #322917.
 .
   * Fixes to dpkg-dev (Frank Lichtenheld):
     - dpkg-checkbuilddeps will now exit with an error if it is unable to
       parse a dependency field.  Closes: #171762, #302229.
     - dpkg-genchanges will now output a warning if given -sd for a native
       package, as it's going to ignore it.  Closes: #5571.
     - dpkg-source fixed to give a more meaningful error message if given
       a directory as the first argument.  Closes: #306874.
     - dpkg-source fixed to handle being given an absolute path to -b.
       Closes: #147574.
     - Fix controllib.pl to allow whitespace before version operators.
       Closes: #273489, #310306.
     - Fix architecture dependency parsing that sometimes generated wrong
       list of requirements.  Closes: #319816.
     - Make the default control field name mangling behaviour "nicer" by
       upper-casing all letters that come after a dash.  Closes: #306474.
     - Ignore trailing newlines in single paragraph control files.
       Closes: #57194, #156319
   * Documentation:
     - Fixed typo in dpkg-architecture man page.  Closes: #317770.
     - Documented dpkg-deb -W/--show and --showformat.  Closes: #319784.
Files: 
 58e36a37b7b2557cad0ba4ac62ba262f 637 base required dpkg_1.13.11.dsc
 1c270abc1e0eb19a56042ee5c78f2c02 3571530 base required dpkg_1.13.11.tar.gz
 6ee6f8d5a6b35f66b8744e231fe1eb7c 1820772 base required dpkg_1.13.11_i386.deb
 ece1d4861d07e98df7dee3ad919c5ec4 119780 base required dselect_1.13.11_i386.deb
 c5492ff26b9de19da9e817be40a46d97 163106 utils standard dpkg-dev_1.13.11_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFDArWGIexP3IStZ2wRAgJzAJ9M5HGRsZPDFLIMECiIIl3H08QqrwCgmtRV
UcV2WKZcKO/OnP9TmDcRO14=
=LBQZ
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to