lkml.org 
[lkml]   [2004]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: PATCH: cdrecord: avoiding scsi device numbering for ide devices
    Let me give some additional remarks to clear up things:

    Joerg Schilling <schilling@fokus.fraunhofer.de> wrote:

    > Pascal Schmidt <der.eremit@email.de> wrote:

    > > The previous Linux implementation allowed users with *read* access
    > > to the device to send arbitrary SG_IO commands. Giving read permission
    >
    > This is of course a kernel bug - but it could be easily fixed.
    > My scg driver for SunOS requires write permissions since it has been
    > created in August 1986.

    Not checking for Write access permissions at this place is a typical mistake
    made by novice programmers, so I never thought this could be in Linux.....


    > > to normal users is quite common, to allow them to run isosize or play
    > > their freshly burned SVCDs with mplayer.
    >
    > So changing the kernel to require write permissions would be a simple fix that
    > would help without breaking cdrtools as libscg of course opens the devices with
    > O_RDWR.

    If Linux still noes not check for write permissions, I would consider there is
    still a bug.

    If there is a list of "aparently safe" SCSI commands that are allowed to be
    executed, then there is another bug in Linux. The only SCSI command that could
    be called safe if Test Unit Ready and even this only if not send more then once
    every few seconds.

    There are several SCSI commands that look safe but would result in coasters
    if issued while a CD or DVD is written.

    Conclusion: It makes no sense to start implementing a fine grained security
    model before basic secutity has been done correctly.

    The best immediate fix for the problem is to just check for read & write
    permissions on the file descriptor and otherwise revert to how it has been
    before 2.6.8.

    Jörg

    --
    EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
    js@cs.tu-berlin.de (uni) If you don't have iso-8859-1
    schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling
    URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:05    [W:3.561 / U:0.968 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site