NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/39904: Unreadable CD may lead to panic (integer divide fault trap in cdstrategy)



>Number:         39904
>Category:       kern
>Synopsis:       Unreadable CD may lead to panic (integer divide fault trap in 
>cdstrategy)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 12 18:35:00 +0000 2008
>Originator:     Sergey Svishchev
>Release:        4.0
>Organization:
>Environment:
>Description:
cd_size() exits early (but doesn't return 0 that cd_get_parms() expects) if 
read_cd_capacity() fails.  Thus, cd->params.blksize is left at 0, which leads 
to trap in cdstrategy():

                /*
                 * If the xfer is not a multiple of the device block size
                 * or it is not block aligned, we need to bounce it.
                 */
                if ((bp->b_bcount % cd->params.blksize) != 0 ||


>How-To-Repeat:
Try to mount a very old (and unreadable) CD-R.
>Fix:
Make cd_size() return 0 or don't return early at all?



Home | Main Index | Thread Index | Old Index