Debian Bug report logs - #152029
e2fsprogs: lsattr segfault on /dev/dri/card0 device

version graph

Package: e2fsprogs; Maintainer for e2fsprogs is Theodore Y. Ts'o <tytso@mit.edu>; Source for e2fsprogs is src:e2fsprogs (PTS, buildd, popcon).

Reported by: "Laurent Bonnaud" <Laurent.Bonnaud@inpg.fr>

Date: Fri, 5 Jul 2002 17:48:01 UTC

Severity: normal

Tags: pending

Found in version 1.27-2

Fixed in version e2fsprogs/1.27+1.28-WIP-0817-1

Done: Yann Dirson <dirson@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Yann Dirson <dirson@debian.org>, e2fsprogs@packages.qa.debian.org:
Bug#152029; Package e2fsprogs. (full text, mbox, link).


Acknowledgement sent to "Laurent Bonnaud" <Laurent.Bonnaud@inpg.fr>:
New Bug report received and forwarded. Copy sent to Yann Dirson <dirson@debian.org>, e2fsprogs@packages.qa.debian.org. (full text, mbox, link).


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

From: "Laurent Bonnaud" <Laurent.Bonnaud@inpg.fr>
To: "Debian Bug Tracking System" <submit@bugs.debian.org>
Subject: e2fsprogs: lsattr segfault on /dev/dri/card0 device
Date: Fri, 05 Jul 2002 19:32:32 +0200
Package: e2fsprogs
Version: 1.27-2
Severity: normal


Hi,

here is the problem:

$ lsattr /dev/dri/card0
s-S----------- /dev/dri/card0
Segmentation fault (core dumped)

$ ls -al /dev/dri/card0
crw-rw-rw-    1 root     root     226,   0 jun 30 11:12 /dev/dri/card0


-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux jophur 2.4.18-k7 #1 Sun Apr 14 13:19:11 EST 2002 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages e2fsprogs depends on:
ii  libc6                         2.2.5-6    GNU C Library: Shared libraries an

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Yann Dirson <dirson@debian.org>, e2fsprogs@packages.qa.debian.org:
Bug#152029; Package e2fsprogs. (full text, mbox, link).


Acknowledgement sent to tytso@mit.edu:
Extra info received and forwarded to list. Copy sent to Yann Dirson <dirson@debian.org>, e2fsprogs@packages.qa.debian.org. (full text, mbox, link).


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

From: tytso@mit.edu
To: "Laurent Bonnaud" <Laurent.Bonnaud@inpg.fr>, 152029@bugs.debian.org
Subject: e2fsprogs: lsattr segfault on /dev/dri/card0 device
Date: Sat, 17 Aug 2002 14:53:14 -0400
>$ lsattr /dev/dri/card0
>s-S----------- /dev/dri/card0
>Segmentation fault (core dumped)
>
>$ ls -al /dev/dri/card0
>crw-rw-rw-    1 root     root     226,   0 jun 30 11:12 /dev/dri/card0

lsattr and chattr can not work against device files, since they use
ioctl's which are supported by the ext2 filesystem, but which aren't
supported by normal devices (and unfortunately normal devices don't
forwawrd the ioctl on to the ext2 filesystem).  In this case, the ioctl
used by lsattr is apparently also implemented by the DRI device driver,
but probably does something completely different.  So the returned
device structure contains garbage, which causes lsattr to core dump.

I've fixed this in the next release of e2fsprogs by causing the libe2p
library (which lsattr uses) to return EOPNOTSUPP immediately if the file
isn't a regular flat file or directory.  This avoids the risk that
lsattr or chattr tries an ioctl on a device file which tries to
interpret it entirely differently.

Fortunately, no one implemented a /dev/launch_nuclear_missles device
driver which also happened to use the ext2 ioctl number assigned to
EXT2_IOC_GETFLAGS.  Else we might have started World War III by
accident.  :-)  But arguably, the fact that the DRI device driver
tried to respond to the EXT2_IOCT_GETFLAGS ioctl number is a bug in the
DRI device driver.

		     					- Ted



Tags added: pending Request was from tytso@mit.edu to control@bugs.debian.org. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Yann Dirson <dirson@debian.org>, e2fsprogs@packages.qa.debian.org:
Bug#152029; Package e2fsprogs. (full text, mbox, link).


Acknowledgement sent to Laurent Bonnaud <Laurent.Bonnaud@inpg.fr>:
Extra info received and forwarded to list. Copy sent to Yann Dirson <dirson@debian.org>, e2fsprogs@packages.qa.debian.org. (full text, mbox, link).


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

From: Laurent Bonnaud <Laurent.Bonnaud@inpg.fr>
To: tytso@mit.edu
Cc: 152029@bugs.debian.org
Subject: Re: e2fsprogs: lsattr segfault on /dev/dri/card0 device
Date: 19 Aug 2002 17:16:48 +0200
Ted> I've fixed this in the next release of e2fsprogs by causing the
Ted> libe2p library (which lsattr uses) to return EOPNOTSUPP
Ted> immediately if the file isn't a regular flat file or directory.
Ted> This avoids the risk that lsattr or chattr tries an ioctl on a
Ted> device file which tries to interpret it entirely differently.

Thank you for the fix !

Ted> But arguably, the fact that the DRI device driver tried to respond
Ted> to the EXT2_IOCT_GETFLAGS ioctl number is a bug in the DRI device
Ted> driver.

Have you reported this bug ?

I'd be glad to report it myself, but you are more qualified than I.

-- 
Laurent.



Information forwarded to debian-bugs-dist@lists.debian.org, Yann Dirson <dirson@debian.org>, e2fsprogs@packages.qa.debian.org:
Bug#152029; Package e2fsprogs. (full text, mbox, link).


Acknowledgement sent to Theodore Ts'o <tytso@mit.edu>:
Extra info received and forwarded to list. Copy sent to Yann Dirson <dirson@debian.org>, e2fsprogs@packages.qa.debian.org. (full text, mbox, link).


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

From: Theodore Ts'o <tytso@mit.edu>
To: Laurent Bonnaud <Laurent.Bonnaud@inpg.fr>
Cc: 152029@bugs.debian.org
Subject: Re: e2fsprogs: lsattr segfault on /dev/dri/card0 device
Date: Mon, 19 Aug 2002 16:46:44 -0400
On Mon, Aug 19, 2002 at 05:16:48PM +0200, Laurent Bonnaud wrote:
> 
> Thank you for the fix !
> 
> Ted> But arguably, the fact that the DRI device driver tried to respond
> Ted> to the EXT2_IOCT_GETFLAGS ioctl number is a bug in the DRI device
> Ted> driver.
> 
> Have you reported this bug ?
> 
> I'd be glad to report it myself, but you are more qualified than I.

No, because I haven't had the time to figure out exactly what the
ioctl conflict is, and to confirm that there is in fact an ioctl
conflict before I report it as a bug.

Also, there isn't much that can be done, short of having DRI renumber
the ioctl it uses --- which would cause backwards compatibility
problems with user-mode applications which use that ioctl.  So there
isn't really a good solution here.  About the best that could be done
would be for the DRI driver to support a new ioctl number as well as
the existing one, and then migrate the user-mode apps over to use the
new ioctl number over the period of period of a stable kernel release.
So we wouldn't be able to remove the conflicting ioctl number until
the Linux 2.8 timeframe.

						- Ted





Reply sent to Yann Dirson <dirson@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to "Laurent Bonnaud" <Laurent.Bonnaud@inpg.fr>:
Bug acknowledged by developer. (full text, mbox, link).


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

From: Yann Dirson <dirson@debian.org>
To: 152029-close@bugs.debian.org
Subject: Bug#152029: fixed in e2fsprogs 1.27+1.28-WIP-0817-1
Date: Mon, 26 Aug 2002 09:17:32 -0400
We believe that the bug you reported is fixed in the latest version of
e2fsprogs, which is due to be installed in the Debian FTP archive:

comerr-dev_2.0-1.27+1.28-WIP-0817-1_i386.deb
  to pool/main/e/e2fsprogs/comerr-dev_2.0-1.27+1.28-WIP-0817-1_i386.deb
e2fsck-static_1.27+1.28-WIP-0817-1_i386.deb
  to pool/main/e/e2fsprogs/e2fsck-static_1.27+1.28-WIP-0817-1_i386.deb
e2fslibs-dev_1.27+1.28-WIP-0817-1_i386.deb
  to pool/main/e/e2fsprogs/e2fslibs-dev_1.27+1.28-WIP-0817-1_i386.deb
e2fsprogs-bf_1.27+1.28-WIP-0817-1_i386.deb
  to pool/main/e/e2fsprogs/e2fsprogs-bf_1.27+1.28-WIP-0817-1_i386.deb
e2fsprogs_1.27+1.28-WIP-0817-1.diff.gz
  to pool/main/e/e2fsprogs/e2fsprogs_1.27+1.28-WIP-0817-1.diff.gz
e2fsprogs_1.27+1.28-WIP-0817-1.dsc
  to pool/main/e/e2fsprogs/e2fsprogs_1.27+1.28-WIP-0817-1.dsc
e2fsprogs_1.27+1.28-WIP-0817-1_i386.deb
  to pool/main/e/e2fsprogs/e2fsprogs_1.27+1.28-WIP-0817-1_i386.deb
e2fsprogs_1.27+1.28-WIP-0817.orig.tar.gz
  to pool/main/e/e2fsprogs/e2fsprogs_1.27+1.28-WIP-0817.orig.tar.gz
ss-dev_2.0-1.27+1.28-WIP-0817-1_i386.deb
  to pool/main/e/e2fsprogs/ss-dev_2.0-1.27+1.28-WIP-0817-1_i386.deb
uuid-dev_1.2-1.27+1.28-WIP-0817-1_i386.deb
  to pool/main/e/e2fsprogs/uuid-dev_1.2-1.27+1.28-WIP-0817-1_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 152029@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Yann Dirson <dirson@debian.org> (supplier of updated e2fsprogs 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@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----

Format: 1.7
Date: Sun, 25 Aug 2002 19:32:12 +0200
Source: e2fsprogs
Binary: e2fsck-static e2fsprogs-bf e2fslibs-dev comerr-dev ss-dev e2fsprogs uuid-dev
Architecture: source i386
Version: 1.27+1.28-WIP-0817-1
Distribution: unstable
Urgency: low
Maintainer: Yann Dirson <dirson@debian.org>
Changed-By: Yann Dirson <dirson@debian.org>
Description: 
 comerr-dev - The Common Error Description library - headers and static librari
 e2fsck-static - A statically-linked version of the ext2 filesystem checker.
 e2fslibs-dev - The headers and static libraries for ext2fs-aware tools-developme
 e2fsprogs  - The EXT2 file system utilities and libraries.
 e2fsprogs-bf - A stripped-down versions of e2fsprogs, for boot-floppies
 ss-dev     - Command-line interface parsing library - headers and static libra
 uuid-dev   - Universally unique id library - headers and static libraries.
Closes: 131350 138003 144621 145044 147256 151990 152029 152891 153102 155007
Changes: 
 e2fsprogs (1.27+1.28-WIP-0817-1) unstable; urgency=low
 .
   * New upstream pre-release.  Closes: #138003, #144621, #145044, #151990,
     #152029, #152891, #155007, #131350, #147256, #153102.
   * New binary: findfs.
   * Added execute permissions to the mkinitrd script (thanks lintian).
   * Don't ship FSIM for EVMS for now.
Files: 
 46036f006da910cc79acc754b9f55f66 757 base required e2fsprogs_1.27+1.28-WIP-0817-1.dsc
 6c876a03ee08904c1b6848e0ca903f8a 2293874 base required e2fsprogs_1.27+1.28-WIP-0817.orig.tar.gz
 9ba83b46d9d2a4bcccdb0de57098af91 811 base required e2fsprogs_1.27+1.28-WIP-0817-1.diff.gz
 e34c7c77b385b0b4bfab69803e6e91ae 236134 admin optional e2fsck-static_1.27+1.28-WIP-0817-1_i386.deb
 20c9aca81614798547daa7b2c6ccee88 170914 devel extra e2fsprogs-bf_1.27+1.28-WIP-0817-1_i386.deb
 9860beed9b76efb106453f1213531374 355418 base required e2fsprogs_1.27+1.28-WIP-0817-1_i386.deb
 d9fe3d0b0219d41931ba489e38162c5c 111224 devel extra e2fslibs-dev_1.27+1.28-WIP-0817-1_i386.deb
 13a37e3eb2b1403fe27e7586c84742b6 39150 devel extra comerr-dev_2.0-1.27+1.28-WIP-0817-1_i386.deb
 e4a2209c97be4033fbc4417ca05f6d13 13686 devel extra ss-dev_2.0-1.27+1.28-WIP-0817-1_i386.deb
 ba02b70bf21ff5b8b9ce8afdd19592c9 13294 devel extra uuid-dev_1.2-1.27+1.28-WIP-0817-1_i386.deb

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

iQB1AwUBPWkljmWBdJ4Do/f1AQFoNwMAqcPMxdMw2gXQs6yzTs1Mr9xtyb1JHya5
WrGl1lDOyaw2IHJnOvld0EV002Ui8CEsOCgxMEPxIp9JVpEP5IiXBqykvBuM+tgP
Z3TGh7sEhRKGHyWxtXLcNqb7vECridyx
=j1vq
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jul 24 00:47:04 2020; Machine Name: buxtehude

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.