discover 1 segfaults in xserver-xfree86 postinst

Bug #12272 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
discover1 (Debian)
Fix Released
Unknown
discover1 (Ubuntu)
Fix Released
High
Daniel Stone

Bug Description

Automatically imported from Debian bug report #292224 http://bugs.debian.org/292224

Revision history for this message
In , Branden Robinson (branden) wrote : clone 291722, reassign 291722 to discover

clone 291722 -1
retitle 291722 xserver-xfree86: don't let vomit get on you when Discover pukes
severity 291722 important
tag 291722 + pending
reassign -1 discover
retitle 291722 discover: stop segfaulting, you idiots
thanks

Kyle McMartin already saw this problem, and worked with me on IRC to
identify the cause. A workaround for XFree86 itself has been committed to
SVN and will be in the next release.

  * Fix xserver-xfree86's configure script to not die if Discover 1.x's
    discover command segfaults. Thanks to Kyle McMartin for reporting this
    problem and testing the fix.[1]

The submitter of 291722 may want to work with the Discover maintainers to
identify the cause of the underlying segfault.

[1] http://necrotic.deadbeast.net/xsf/XFree86/trunk/debian/changelog

--
G. Branden Robinson | Why should I allow that same God
Debian GNU/Linux | to tell me how to raise my kids,
<email address hidden> | who had to drown His own?
http://people.debian.org/~branden/ | -- Robert Green Ingersoll

Revision history for this message
In , Branden Robinson (branden) wrote : retitle 292224 to discover: stop segfaulting, you idiots ...

# Automatically generated email from bts, devscripts version 2.8.10
retitle 292224 discover: stop segfaulting, you idiots
retitle 291722 xserver-xfree86: don't let vomit get on you when Discover pukes

Revision history for this message
In , Jeff Licquia (licquia) wrote : reassigning bug

retitle 292224 discover 1 segfaults in xserver-xfree86 postinst
reassign 292224 discover1
thanks

Discover 1.x bugs are the domain of the discover1 package. And there's
no need to be abusive.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #292224 http://bugs.debian.org/292224

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Sat, 22 Jan 2005 11:09:34 -0800
From: Ryan Murray <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: fails to upgrade/install

Package: xserver-xfree86
Version: 4.3.0.dfsg.1-10
Severity: grave

Preconfiguring packages ...
xserver-xfree86 failed to preconfigure, with exit status 139
(Reading database ... 88681 files and directories currently installed.)
Unpacking xserver-xfree86 (from
..../xserver-xfree86_4.3.0.dfsg.1-10_i386.deb) ...
dpkg: error processing
/var/cache/apt/archives/xserver-xfree86_4.3.0.dfsg.1-10_i386.deb
(--unpack):
 subprocess pre-installation script returned error exit status 139
Errors were encountered while processing:
 /var/cache/apt/archives/xserver-xfree86_4.3.0.dfsg.1-10_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Running the preinst/postinst from -8 (the previously installed version)
or -10 from the command line with -x has both scripts exiting successfully.

I've tried using the dpkg from unstable as well, and there's no
difference.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-ac12
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages xserver-xfree86 depends on:
ii debconf [debconf-2.0] 1.4.30.11 Debian configuration management sy
ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an
ii libgcc1 1:3.4.3-6 GCC support library
ii xserver-common 4.3.0.dfsg.1-10 files and utilities common to all
ii zlib1g 1:1.2.2-3 compression library - runtime

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 25 Jan 2005 15:49:28 -0500
From: Branden Robinson <email address hidden>
To: <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: clone 291722, reassign 291722 to discover

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

clone 291722 -1
retitle 291722 xserver-xfree86: don't let vomit get on you when Discover pu=
kes
severity 291722 important
tag 291722 + pending
reassign -1 discover
retitle 291722 discover: stop segfaulting, you idiots
thanks

Kyle McMartin already saw this problem, and worked with me on IRC to
identify the cause. A workaround for XFree86 itself has been committed to
SVN and will be in the next release.

  * Fix xserver-xfree86's configure script to not die if Discover 1.x's
    discover command segfaults. Thanks to Kyle McMartin for reporting this
    problem and testing the fix.[1]

The submitter of 291722 may want to work with the Discover maintainers to
identify the cause of the underlying segfault.

[1] http://necrotic.deadbeast.net/xsf/XFree86/trunk/debian/changelog

--=20
G. Branden Robinson | Why should I allow that same God
Debian GNU/Linux | to tell me how to raise my kids,
<email address hidden> | who had to drown His own?
http://people.debian.org/~branden/ | -- Robert Green Ingersoll

--u3bvv0EcKsvvYeex
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

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

iEYEARECAAYFAkH2sNgACgkQ6kxmHytGonw4RgCcDjSHIJk7PrLafvSrOrfgmcEm
Y3IAnRwwwmaDBDDC0Oo4TIffONB+FxSC
=MO5k
-----END PGP SIGNATURE-----

--u3bvv0EcKsvvYeex--

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Tue, 25 Jan 2005 16:08:08 -0500
From: Branden Robinson <email address hidden>
To: <email address hidden>
Subject: retitle 292224 to discover: stop segfaulting, you idiots ...

# Automatically generated email from bts, devscripts version 2.8.10
retitle 292224 discover: stop segfaulting, you idiots
retitle 291722 xserver-xfree86: don't let vomit get on you when Discover pukes

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Tue, 25 Jan 2005 18:07:06 -0500
From: Jeff Licquia <email address hidden>
To: <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: reassigning bug

retitle 292224 discover 1 segfaults in xserver-xfree86 postinst
reassign 292224 discover1
thanks

Discover 1.x bugs are the domain of the discover1 package. And there's
no need to be abusive.

Revision history for this message
Daniel Stone (daniels) wrote :

We're also a lot more sensible about what we exclude from discover1's scans, and
haven't seen anyone bitten since I started excluding buses like SCSI, whereas
I'd seen a few before.

Revision history for this message
In , Ryan Murray (rmurray) wrote : Re: Bug#291722: clone 291722, reassign 292224 to discover1

On Tue, Jan 25, 2005 at 03:49:28PM -0500, Branden Robinson wrote:
> * Fix xserver-xfree86's configure script to not die if Discover 1.x's
> discover command segfaults. Thanks to Kyle McMartin for reporting this
> problem and testing the fix.[1]

Yes, that was indeed the problem.

> The submitter of 291722 may want to work with the Discover maintainers to
> identify the cause of the underlying segfault.

ltrace:
ide_detect(0x804c030, 0x804a440, 0x804a480, 0x804bac0, 0xbffff43c <unfinished ...>

strace:
open("/proc/ide/hda/geometry", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe8000
read(5, 0xb7fe8000, 1024) = -1 EIO (Input/output error)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Apparently discover1 doesn't handle getting read errors too gracefully.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 25 Jan 2005 22:38:39 -0800
From: Ryan Murray <email address hidden>
To: Branden Robinson <email address hidden>, <email address hidden>
Subject: Re: Bug#291722: clone 291722, reassign 292224 to discover1

On Tue, Jan 25, 2005 at 03:49:28PM -0500, Branden Robinson wrote:
> * Fix xserver-xfree86's configure script to not die if Discover 1.x's
> discover command segfaults. Thanks to Kyle McMartin for reporting this
> problem and testing the fix.[1]

Yes, that was indeed the problem.

> The submitter of 291722 may want to work with the Discover maintainers to
> identify the cause of the underlying segfault.

ltrace:
ide_detect(0x804c030, 0x804a440, 0x804a480, 0x804bac0, 0xbffff43c <unfinished ...>

strace:
open("/proc/ide/hda/geometry", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe8000
read(5, 0xb7fe8000, 1024) = -1 EIO (Input/output error)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Apparently discover1 doesn't handle getting read errors too gracefully.

Revision history for this message
In , Steinar H. Gunderson (sesse) wrote :

On Tue, Jan 25, 2005 at 10:38:39PM -0800, Ryan Murray wrote:
> read(5, 0xb7fe8000, 1024) = -1 EIO (Input/output error)
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
>
> Apparently discover1 doesn't handle getting read errors too gracefully.

Check lib/ide.c:264; sscanf() on what could be a NULL pointer (since
getline() can fail). Add an "if (line)" and it should be okay.

/* Steinar */
--
Homepage: http://www.sesse.net/

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 1 Feb 2005 23:39:25 +0100
From: "Steinar H. Gunderson" <email address hidden>
To: <email address hidden>
Subject: Re: Bug#291722: clone 291722, reassign 292224 to discover1

On Tue, Jan 25, 2005 at 10:38:39PM -0800, Ryan Murray wrote:
> read(5, 0xb7fe8000, 1024) = -1 EIO (Input/output error)
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
>
> Apparently discover1 doesn't handle getting read errors too gracefully.

Check lib/ide.c:264; sscanf() on what could be a NULL pointer (since
getline() can fail). Add an "if (line)" and it should be okay.

/* Steinar */
--
Homepage: http://www.sesse.net/

Revision history for this message
In , Joshua Kwan (joshk) wrote : setting package to discover1 discover1 libdiscover1 libdiscover1-dev libdiscover1-pic discover1-udeb ... ...

# Automatically generated email from bts, devscripts version 2.8.10
package discover1 discover1 libdiscover1 libdiscover1-dev libdiscover1-pic discover1-udeb
tags 292012 + pending
tags 292224 + pending

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <E1Cw9K8-0006Bf-00@darjeeling>
Date: Tue, 1 Feb 2005 17:28:52 -0800
From: Joshua Kwan <email address hidden>
To: <email address hidden>
Subject: setting package to discover1 discover1 libdiscover1 libdiscover1-dev libdiscover1-pic
 discover1-udeb ... ...

# Automatically generated email from bts, devscripts version 2.8.10
package discover1 discover1 libdiscover1 libdiscover1-dev libdiscover1-pic discover1-udeb
tags 292012 + pending
tags 292224 + pending

Revision history for this message
In , Joshua Kwan (joshk) wrote : Bug#292224: fixed in discover1 1.7.7
Download full text (3.9 KiB)

Source: discover1
Source-Version: 1.7.7

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

discover1-udeb_1.7.7_i386.udeb
  to pool/main/d/discover1/discover1-udeb_1.7.7_i386.udeb
discover1_1.7.7.dsc
  to pool/main/d/discover1/discover1_1.7.7.dsc
discover1_1.7.7.tar.gz
  to pool/main/d/discover1/discover1_1.7.7.tar.gz
discover1_1.7.7_i386.deb
  to pool/main/d/discover1/discover1_1.7.7_i386.deb
libdiscover1-dev_1.7.7_i386.deb
  to pool/main/d/discover1/libdiscover1-dev_1.7.7_i386.deb
libdiscover1-pic_1.7.7_i386.deb
  to pool/main/d/discover1/libdiscover1-pic_1.7.7_i386.deb
libdiscover1_1.7.7_i386.deb
  to pool/main/d/discover1/libdiscover1_1.7.7_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 address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joshua Kwan <email address hidden> (supplier of updated discover1 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 address hidden>)

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

Format: 1.7
Date: Thu, 3 Feb 2005 09:26:05 -0800
Source: discover1
Binary: libdiscover1 discover1 libdiscover1-pic discover1-udeb libdiscover1-dev
Architecture: source i386
Version: 1.7.7
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <email address hidden>
Changed-By: Joshua Kwan <email address hidden>
Description:
 discover1 - hardware identification system
 discover1-udeb - hardware identification library (udeb) (udeb)
 libdiscover1 - hardware identification library
 libdiscover1-dev - hardware identification library development files
 libdiscover1-pic - hardware identification library - static PIC version
Closes: 290024 292012 292224 292598
Changes:
 discover1 (1.7.7) unstable; urgency=medium
 .
   * Translations
     - Updated Japanese, thanks Kenshi. closes: #290024
     - Added Tagalog translations. Closes: #292012
     - Updated Traditional Chinese for programs. Closes: #292598
   * Joshua Kwan
     - Do a NULL-check after a getline call that might potentially fail
       and cause a sscanf(NULL, ...). closes: #292224
     - Don't generate .cvsignore files anymore.
Files:
 7a1cd96e68a76fb1ab15bb974494b93e 1460 admin optional discover1_1.7.7.dsc
 05aea69e527d2f922e3fb15f96418bbf 631031 admin optional discover1_1.7.7.tar.gz
 0684b847f9bd6ed00fd63c6850b9572d 93388 admin optional discover1_1.7.7_i386.deb
 d210c6b0745938e8ed54a068bb67fc5a 85574 libs optional libdiscover1_1.7.7_i386.deb
 2c6bc936a3c9f078122b74ecdfa53a0f 57848 libdevel optional libdiscover1-dev_1.7.7_i386.deb
 10225886226e1d69af137eef1702d080 56422 libs extra libdiscover1-pic_1.7.7_i386.deb
 ec4541f25d42698a77cf5403e978e905 34658 debian-installer extra discover1-udeb_1.7.7_i386.udeb
package-type: udeb

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

Read more...

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (4.1 KiB)

Message-Id: <email address hidden>
Date: Thu, 03 Feb 2005 19:32:18 -0500
From: Joshua Kwan <email address hidden>
To: <email address hidden>
Subject: Bug#292224: fixed in discover1 1.7.7

Source: discover1
Source-Version: 1.7.7

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

discover1-udeb_1.7.7_i386.udeb
  to pool/main/d/discover1/discover1-udeb_1.7.7_i386.udeb
discover1_1.7.7.dsc
  to pool/main/d/discover1/discover1_1.7.7.dsc
discover1_1.7.7.tar.gz
  to pool/main/d/discover1/discover1_1.7.7.tar.gz
discover1_1.7.7_i386.deb
  to pool/main/d/discover1/discover1_1.7.7_i386.deb
libdiscover1-dev_1.7.7_i386.deb
  to pool/main/d/discover1/libdiscover1-dev_1.7.7_i386.deb
libdiscover1-pic_1.7.7_i386.deb
  to pool/main/d/discover1/libdiscover1-pic_1.7.7_i386.deb
libdiscover1_1.7.7_i386.deb
  to pool/main/d/discover1/libdiscover1_1.7.7_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 address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joshua Kwan <email address hidden> (supplier of updated discover1 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 address hidden>)

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

Format: 1.7
Date: Thu, 3 Feb 2005 09:26:05 -0800
Source: discover1
Binary: libdiscover1 discover1 libdiscover1-pic discover1-udeb libdiscover1-dev
Architecture: source i386
Version: 1.7.7
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <email address hidden>
Changed-By: Joshua Kwan <email address hidden>
Description:
 discover1 - hardware identification system
 discover1-udeb - hardware identification library (udeb) (udeb)
 libdiscover1 - hardware identification library
 libdiscover1-dev - hardware identification library development files
 libdiscover1-pic - hardware identification library - static PIC version
Closes: 290024 292012 292224 292598
Changes:
 discover1 (1.7.7) unstable; urgency=medium
 .
   * Translations
     - Updated Japanese, thanks Kenshi. closes: #290024
     - Added Tagalog translations. Closes: #292012
     - Updated Traditional Chinese for programs. Closes: #292598
   * Joshua Kwan
     - Do a NULL-check after a getline call that might potentially fail
       and cause a sscanf(NULL, ...). closes: #292224
     - Don't generate .cvsignore files anymore.
Files:
 7a1cd96e68a76fb1ab15bb974494b93e 1460 admin optional discover1_1.7.7.dsc
 05aea69e527d2f922e3fb15f96418bbf 631031 admin optional discover1_1.7.7.tar.gz
 0684b847f9bd6ed00fd63c6850b9572d 93388 admin optional discover1_1.7.7_i386.deb
 d210c6b0745938e8ed54a068bb67fc5a 85574 libs optional libdiscover1_1.7.7_i386.deb
 2c6bc936a3c9f078122b74ecdfa53a0f 57848 libdevel optional libdiscover1-dev_1.7.7_i386.deb
 10225886226e1d69af137eef1702d080 56422 libs extra libd...

Read more...

Changed in discover1:
status: Unknown → 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.