Bug 149331 - Linux sg driver segmentation fault in kernel 2.6.10
Linux sg driver segmentation fault in kernel 2.6.10
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: cdrtools (Show other bugs)
2
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Harald Hoyer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-22 10:15 EST by Henry Leung
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-14 21:31:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Henry Leung 2005-02-22 10:15:07 EST
Description of problem:
When running cdrecord in kernel 2.6.10, segmentation fault occurs in
Linux sg driver.

Version-Release number of selected component (if applicable):
cdrecord-2.01.1-0.FC2.1
kernel-2.6.10-1.14_FC2

How reproducible:
Run cdrecord with the kernel version above. It will fails with
segmentation fault. No problem in kernel version 2.6.6.

Steps to Reproduce:
1. Boot fc2 with any version of kernel 2.6.10
2. Insert a CDRW to the cdwriter
3. Run the following command:
      cdrecord blank=fast
  
Actual results:
cdrecord will fails to blank the CDRW and quit with segmentation fault:
[hleung@localhost hleung]$ cdrecord blank=fast
Cdrecord-Clone 2.01-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004 J
ç¹¹rg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to
http://bugzilla.redhat.com/bugzilla
Note: The author of cdrecord should not be bothered with problems in
this version.
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
Segmentation fault

Expected results:
It should blank the CDRW successfully like this:
[hleung@localhost hleung]$ cdrecord blank=fast
Cdrecord-Clone 2.01-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004 J
ç¹¹rg Schill
ing
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to
http://bugzilla.redhat.com/
bugzilla
Note: The author of cdrecord should not be bothered with problems in
this versio
n.
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version
(schily - Red                                                        
     Hat-scsi-linux-sg.c-1.83-RH '@(#)scsi-linux-sg.c        1.83
04/05/20 Copyright                                                   
          1997 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 1
Vendor_info    : 'MATSHITA'
Identifikation : 'UJDD410         '
Revision       : '2.02'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-2 SWABAUDIO BURNFREE FORCESPEED
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R96R
Speed set to 1764 KB/s
Starting to write CD/DVD at speed  10.0 in real BLANK mode for single
session.
Last chance to quit, starting real write    0 seconds. Operation starts.
[hleung@localhost hleung]$

Additional info:
Although kernel 2.6.6 successfully blank a CDRW, it keeps on display
the following error message:
Feb 22 22:47:18 localhost kernel: kudzu: Using deprecated /dev/sg
mechanism instead of SG_IO on the actual device
Feb 22 22:47:46 localhost kernel: updfstab: Using deprecated /dev/sg
mechanism instead of SG_IO on the actual device
Feb 22 22:47:47 localhost kernel: updfstab: Using deprecated /dev/sg
mechanism instead of SG_IO on the actual device
Feb 22 22:47:47 localhost kernel: updfstab: Using deprecated /dev/sg
mechanism instead of SG_IO on the actual device
Feb 22 22:54:06 localhost kernel: cdrecord: Using deprecated /dev/sg
mechanism instead of SG_IO on the actual device
Comment 1 Dave Jones 2005-02-22 13:47:14 EST
is there a kernel oops in the log if you type 'dmesg' ?
Comment 2 Henry Leung 2005-02-22 20:16:17 EST
No kernel oops were found. When I type "dmesg|grep oops" it returns
nothing
Comment 3 Dave Jones 2005-02-23 23:02:36 EST
if theres nothing related in the kernel messages, this is likely a problem in
cdrecord, and should probably be reassigned.
Comment 4 Henry Leung 2005-02-24 04:39:30 EST
(In reply to comment #3)
Yes, you are right. Now I found that the /usr/bin/cdrecord should not be set
suid. From the news provided by the website www.k3b.org, I realized that kernel
2.6.9 or later prohibit programs with suid to access the SCSI subsystem.
Finally, the problem is now fixed by the command chmod -s /usr/bin/cdrecord.

Note You need to log in before you can comment on or make changes to this bug.