Bug 22664

Summary: [PATCH] mounting an audio CD causes kernel panic
Product: Base System Reporter: George Reid <greid>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
file.diff
none
file.diff none

Description George Reid 2000-11-07 18:30:01 UTC
Wrongly trying to mount an audio CD causes a kernel panic. I discovered
this by when I tried to mount the wrong drive and lost a document I was
working on. Whoops.

The included patch adds a new ioctl, CDIOCGETMEDIUM to
/sys/dev/ata/atapi-cd.c (and /sys/sys/cdio.h) to retrieve the medium
information from the kernel. The patch to mount_cd9660.c adds support for
utilising this ioctl to check for people-who-do-bad-things-as-root.

Fix: [PATCH 1: /sys/dev/ata/atapi-cd.c]
[PATCH 2: /sys/sys/cdio.h]
[PATCH 3: /usr/src/sys/sbin/mount_cd9660/mount_cd9660.c]
How-To-Repeat: 
Try to mount an audio CD as if it were a data CD.
Comment 1 Szilveszter Adam 2000-11-07 18:52:25 UTC
On Tue, Nov 07, 2000 at 06:30:08PM +0000, George Reid wrote:
> 
> >Number:         22664
> >Category:       kern
> >Synopsis:       [PATCH] mounting an audio CD causes kernel panic
> >Confidential:   no
> >Severity:       serious
> >Priority:       low
> >Responsible:    freebsd-bugs
> >State:          open
> >Quarter:        
> >Keywords:       
> >Date-Required:
> >Class:          sw-bug
> >Submitter-Id:   current-users
> >Arrival-Date:   Tue Nov 07 10:30:01 PST 2000
> >Closed-Date:
> >Last-Modified:
> >Originator:     George Reid
> >Release:        FreeBSD 5.0-CURRENT i386
> >Organization:
> FreeBSD UK User Group
> >Environment:
> 
> FreeBSD-5.0-CURRENT i386
> 
> >Description:
> 
> Wrongly trying to mount an audio CD causes a kernel panic. I discovered
> this by when I tried to mount the wrong drive and lost a document I was
> working on. Whoops.

While we are here, would it be possible to fix a related problem with mixed
mode CDs? (ie CDs that have both audio and data, like many audio CDs that
include a multimedia part in the end) When I try to mount one, I either get:

cd9660: Invalid argument or (just tried it:-( a cool trap12 panic.

I am sure this worked in 3.x but not since I upgraded to 4.x and then
-CURRENT. 

Unfortunately, no patches for this one:-( 

-- 
Regards:

Szilveszter ADAM
Szeged University
Szeged Hungary
Comment 2 greid freebsd_committer freebsd_triage 2001-05-29 01:04:30 UTC
State Changed
From-To: open->closed

This is no longer an issue for me (I am the submitter)