Your message dated Sun, 05 Feb 2006 13:32:32 -0800
with message-id <[EMAIL PROTECTED]>
and subject line Bug#351293: fixed in iftop 0.16-5
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)

--- Begin Message ---
>From [EMAIL PROTECTED] Fri Feb 03 13:47:16 2006
Received: (at submit) by bugs.debian.org; 3 Feb 2006 21:47:16 +0000
Return-path: <[EMAIL PROTECTED]>
Received: from kitenet.net ([64.62.161.42] ident=postfix)
        by spohr.debian.org with esmtp (Exim 4.50)
        id 1F58lv-0001Dt-Uu
        for [EMAIL PROTECTED]; Fri, 03 Feb 2006 13:47:16 -0800
Received: from dragon.kitenet.net (101-045-dial.xtn.net [66.118.101.45])
        (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
        (Client CN "Joey Hess", Issuer "Joey Hess" (verified OK))
        by kitenet.net (Postfix) with ESMTP id 340EF17DF8
        for <[EMAIL PROTECTED]>; Fri,  3 Feb 2006 21:47:13 +0000 (GMT)
Received: by dragon.kitenet.net (Postfix, from userid 1000)
        id 74E27BEEBC; Fri,  3 Feb 2006 16:47:08 -0500 (EST)
Date: Fri, 3 Feb 2006 16:47:07 -0500
From: Joey Hess <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: broken is_cfgdirective_valid causes crash on arm
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
        protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0"
Content-Disposition: inline
X-Reportbug-Version: 3.18
User-Agent: Mutt/1.5.11
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=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02


--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: iftop
Version: 0.16-4
Severity: normal
Tags: patch

If my ~/.iftoprc contains dns-resolution or port-resolution lines, like thi=
s:

dns-resolution: yes

And I'm running iftop on an arm machine, it segfaults reading the config
file. This is because of this broken code:

int is_cfgdirective_valid(const char *s) {
    char* t;
    for (t =3D config_directives[0]; t !=3D NULL; ++t)=20
       if (strcmp(s, t) =3D=3D 0) return 1;
    return 0;
}

++t does not do what the author of this code thinks it does; it just
increments the pointer by one character, not to the next word in
config_directives[0]. So if the config file contains an invalid config
directive, it walks through the entire program memory like this. On i386
this happens to not crash (although it takes it a lot longer to start up
than it should due to this); on arm it eventually walks off the programs's
memory space and segfaults. Here's an ltrace of ntop on i386 showing it
looking at completly inappropriate parts of memory:

strcmp("port-resolution", "\376\377\377o\340\220\004\b\377\377\377o\003") =
=3D -1
strcmp("port-resolution", "\377\377o\340\220\004\b\377\377\377o\003") =3D -1
strcmp("port-resolution", "\377o\340\220\004\b\377\377\377o\003") =3D -1
strcmp("port-resolution", "o\340\220\004\b\377\377\377o\003") =3D 1

Here's how the function should be written:

int is_cfgdirective_valid(const char *s) {
    int t;
    for (t =3D 0; config_directives[t] !=3D NULL; t++)=20
       if (strcmp(s, config_directives[t]) =3D=3D 0) return 1;
    return 0;
}

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: arm
Shell:  /bin/sh linked to /bin/bash
Kernel: 2.6.15-1-nslu2
Locale: LANG=3Den_US.UTF-8, LC_CTYPE=3Den_US.UTF-8 (charmap=3DUTF-8)

Versions of packages iftop depends on:
ii  libc6                         2.3.5-12   GNU C Library: Shared librarie=
s an
ii  libncurses5                   5.5-1      Shared libraries for terminal =
hand
ii  libpcap0.7                    0.7.2-7    System interface for user-leve=
l pa

iftop recommends no packages.

-- no debconf information

--=20
see shy jo

--k+w/mQv8wyuph6w0
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

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

iD8DBQFD489bd8HHehbQuO8RAv4SAKCSq2ARIkPEtWGZ8MjDKm8GMZy7cgCfTsED
/zcjSIBskeroRzvTQ+PKLjI=
=y+re
-----END PGP SIGNATURE-----

--k+w/mQv8wyuph6w0--


--- End Message ---
--- Begin Message ---
>From [EMAIL PROTECTED] Sun Feb 05 13:40:42 2006
Received: (at 351293-close) by bugs.debian.org; 5 Feb 2006 21:40:42 +0000
Return-path: <[EMAIL PROTECTED]>
Received: from katie by spohr.debian.org with local (Exim 4.50)
        id 1F5rUm-0006v1-Lz; Sun, 05 Feb 2006 13:32:32 -0800
From: Daniel Baumann <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.65 $
Subject: Bug#351293: fixed in iftop 0.16-5
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Sun, 05 Feb 2006 13:32:32 -0800
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

Source: iftop
Source-Version: 0.16-5

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

iftop_0.16-5.diff.gz
  to pool/main/i/iftop/iftop_0.16-5.diff.gz
iftop_0.16-5.dsc
  to pool/main/i/iftop/iftop_0.16-5.dsc
iftop_0.16-5_i386.deb
  to pool/main/i/iftop/iftop_0.16-5_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.
Daniel Baumann <[EMAIL PROTECTED]> (supplier of updated iftop 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: Sat,  4 Feb 2006 12:13:00 +0100
Source: iftop
Binary: iftop
Architecture: source i386
Version: 0.16-5
Distribution: unstable
Urgency: low
Maintainer: Daniel Baumann <[EMAIL PROTECTED]>
Changed-By: Daniel Baumann <[EMAIL PROTECTED]>
Description: 
 iftop      - displays bandwidth usage information on an network interface
Closes: 351293
Changes: 
 iftop (0.16-5) unstable; urgency=low
 .
   * Added patch to fix crash on arm (Closes: #351293).
Files: 
 ad18e90a31ef52b4b5052719a00b4331 623 net optional iftop_0.16-5.dsc
 0aeedf287fe17f29697fae5bd3bb2851 26391 net optional iftop_0.16-5.diff.gz
 f3558b42fc900e26e82d1eb6219c867e 30736 net optional iftop_0.16-5_i386.deb

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

iD8DBQFD5lqDxa93SlhRC1oRAlkIAJ0Z9AcJazRoOdM7xSnhmcmXJZ7+/ACbB8Ab
k2CAbLn4gafuW+6phTZR7E4=
=CpTB
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to