Debian Bug report logs - #878487
checkinstall: Segmentation fault when invoking `checkinstall cmake -P cmake_install.cmake`

version graph

Package: checkinstall; Maintainer for checkinstall is Stephen Gelman <ssgelm@debian.org>; Source for checkinstall is src:checkinstall (PTS, buildd, popcon).

Reported by: Giulio Moro <giuliomoro@yahoo.it>

Date: Sat, 14 Oct 2017 01:15:02 UTC

Severity: grave

Tags: patch, upstream

Found in version checkinstall/1.6.2-4

Fixed in version checkinstall/1.6.2-5

Done: Stephen Gelman <ssgelm@debian.org>

Bug is archived. No further changes may be made.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Andreas Noteng <andreas@noteng.no>:
Bug#878487; Package checkinstall. (Sat, 14 Oct 2017 01:15:04 GMT) (full text, mbox, link).


Acknowledgement sent to Giulio Moro <giuliomoro@yahoo.it>:
New Bug report received and forwarded. Copy sent to Andreas Noteng <andreas@noteng.no>. (Sat, 14 Oct 2017 01:15:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Giulio Moro <giuliomoro@yahoo.it>
To: "submit@bugs.debian.org" <submit@bugs.debian.org>
Subject: checkinstall: Segmentation fault when invoking `checkinstall cmake -P cmake_install.cmake`
Date: Sat, 14 Oct 2017 01:10:35 +0000 (UTC)
[Message part 1 (text/plain, inline)]
Package: checkinstall
Version: 1.6.2-4
Severity: grave
Tags: patch upstream
Justification: renders package unusable

Dear Maintainer,

in installwatch.c, _xstat64() is missing check for initialization

As a consequence of this, if `__xstat64()` is the first function called from
the library, then no initalization is performed and the program segfaults when
trying to call `true_xstat64()` which is uninitialized

This causes a segmentation fault on Debian Stretch when invoking e.g.:
`checkinstall cmake -P cmake_install.cmake`

I filed the bug upstream: https://bugtrack.izto.org:4442/show_bug.cgi?id=171

Patch:

diff --git a/installwatch/installwatch.c b/installwatch/installwatch.c
index 8e6c616..51493b1 100644
--- a/installwatch/installwatch.c
+++ b/installwatch/installwatch.c
@@ -3746,6 +3746,9 @@ int __xstat64(int version,const char *pathname,struct
stat64 *info) {
        instw_t instw;
        int status;

+       if (!libc_handle)
+           initialize();
+
 #if DEBUG
        debug(2,"stat64(%s,%p)\n",pathname,info);
 #endif


-- System Information:
Debian Release: 9.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: armhf (armv7l)

Kernel: Linux 4.4.87-ti-xenomai-r121 (PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages checkinstall depends on:
ii  dpkg-dev  1.18.24
ii  file      1:5.30-1
ii  libc6     2.24-11

Versions of packages checkinstall recommends:
ii  make  4.1-9.1

Versions of packages checkinstall suggests:
ii  gettext  0.19.8.1-2

-- no debconf information

[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Andreas Noteng <andreas@noteng.no>:
Bug#878487; Package checkinstall. (Wed, 10 Jul 2019 04:57:03 GMT) (full text, mbox, link).


Acknowledgement sent to Stephen Gelman <ssgelm@debian.org>:
Extra info received and forwarded to list. Copy sent to Andreas Noteng <andreas@noteng.no>. (Wed, 10 Jul 2019 04:57:03 GMT) (full text, mbox, link).


Message #10 received at 878487@bugs.debian.org (full text, mbox, reply):

From: Stephen Gelman <ssgelm@debian.org>
To: 878487@bugs.debian.org
Subject: checkinstall bug
Date: Tue, 9 Jul 2019 23:55:07 -0500
Thanks for reporting this and providing a patch!  I just uploaded checkinstall 1.6.2-5 which includes your patch.  Unfortunately this didn’t make it into buster but once this fixed version migrates to testing I will upload it to buster-backports.

Thanks!

Stephen


Reply sent to Stephen Gelman <ssgelm@debian.org>:
You have taken responsibility. (Wed, 10 Jul 2019 05:09:03 GMT) (full text, mbox, link).


Notification sent to Giulio Moro <giuliomoro@yahoo.it>:
Bug acknowledged by developer. (Wed, 10 Jul 2019 05:09:03 GMT) (full text, mbox, link).


Message #15 received at 878487-close@bugs.debian.org (full text, mbox, reply):

From: Stephen Gelman <ssgelm@debian.org>
To: 878487-close@bugs.debian.org
Subject: Bug#878487: fixed in checkinstall 1.6.2-5
Date: Wed, 10 Jul 2019 05:07:21 +0000
Source: checkinstall
Source-Version: 1.6.2-5

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

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 878487@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Stephen Gelman <ssgelm@debian.org> (supplier of updated checkinstall 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 ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 09 Jul 2019 23:01:02 -0500
Source: checkinstall
Architecture: source
Version: 1.6.2-5
Distribution: unstable
Urgency: medium
Maintainer: Stephen Gelman <ssgelm@debian.org>
Changed-By: Stephen Gelman <ssgelm@debian.org>
Closes: 878487
Changes:
 checkinstall (1.6.2-5) unstable; urgency=medium
 .
   * New maintainer
   * Move VCS to salsa
   * Update to debhelper compat level 12
   * Update to Standards-Version 4.4.0 (no change)
   * Minor lintian fixes
   * Test installcheck when building the package using included tests
   * Fix segfault relating to _xstat64() (Thanks to Giulio Moro for the fix!)
     (Closes: #878487)
Checksums-Sha1:
 128bead0e367d2bda200784696726f9c75f950ba 2111 checkinstall_1.6.2-5.dsc
 cf35654014723b48c6ba424549577bdd709601fa 16368 checkinstall_1.6.2-5.debian.tar.xz
 ebfe3be33dfdd0dd0bcad7f74df80e4af14b3a4c 5704 checkinstall_1.6.2-5_amd64.buildinfo
Checksums-Sha256:
 81dcc16ab833d9273425697b95a53f9329ec3d6ce19199bec039a9aadb755152 2111 checkinstall_1.6.2-5.dsc
 c589bb94a5fe93e007da47892581cfd08b20648b0f8c9a4c6df7d6252592c792 16368 checkinstall_1.6.2-5.debian.tar.xz
 ed78c01c040c334d4de30eeb23134a0b6cb15cf752dbea6b56c31f01ef01f68e 5704 checkinstall_1.6.2-5_amd64.buildinfo
Files:
 37cb6590d20298a61395c1f677d9b651 2111 admin optional checkinstall_1.6.2-5.dsc
 f562acf092537667a8632a8fc03b7f4d 16368 admin optional checkinstall_1.6.2-5.debian.tar.xz
 98147c79e22217292fa566325caacad1 5704 admin optional checkinstall_1.6.2-5_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEPwDop1BN06KlsbfijqM4hED8f1wFAl0lbssSHHNzZ2VsbUBk
ZWJpYW4ub3JnAAoJEI6jOIRA/H9c1d0QAJGFkRKdEEiw6N5IHuLU028oXyNfldPa
LTYzSO4FyYGvtZu0N2yxNa6L0ZEhMePGA6kZ1pt8IjQSSRjPsBSxZwo58m9Xl1Fk
DeC98egQ9cmbCsITO5vsrpDyoLtSo2BP75mnEZ40WUzbdVKhp0868M4PsqFSG+lK
Bx23txAFIpZUj6n/r3at/nARCVeNDSKhQovh5Jbst9kfKW/6nlXVlGuxGbeMWI0U
fqdML0N2oHwoWO81k1Jrpjpg7W4IjFbTkPxDtTgKXXRt/93kYvxq/9E0PVg8WVmU
F2Y8FZOGO9CcsiyQQYocvYNmS+n9iwAa40ruotTP56fEeDqSREf/ge2OiRd26Tan
gSfXpNkEzGayCw/XB6hhoQVrAW1VBEXqbhOHRpKE3egtJLZfWtsX/nEsKuhB/Cvh
0GV7euQsgs3mBAzOFp+KQpakjyg+KYAsvr/OhlPnMQrIZiy44vDL+BmvFC17wMKd
5JBvuqHOX+GLqDvs6XK9Pl1sscCS5HSiFpy9q2myi4J7Jto144hSXGc2aqgAPYRQ
mPSut/CiY+LCX3TFSyHN8Tgxc1vjkZBFvMn72JYR5xTQZt+WdTpgPqVkOD47soHm
pwNI1EKIj0+JNgvM8y6JlCKZbau8cCPIwceoDykmfpQC3ZCvMEUvtldT06+6hXni
vNdqEZ3/WNnY
=e0bJ
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 12 Aug 2019 07:30:09 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Sep 14 06:46:35 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.