[haiku-commits] Re: haiku: hrev48282 - src/system/kernel/disk_device_manager

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 11 Nov 2014 17:45:47 +0100

On Tue, Nov 11, 2014 at 05:30:32PM +0100, Axel Dörfler wrote:
> Am 11/11/2014 17:18, schrieb pulkomandy@xxxxxxxxxxxxx:
> >7b4084f: reject partitions with negative offset
> 
> Have you checked that it's not just an integer overflow in the partitioning
> system?

Well, this is an audio CD so if it's an overflow, it would be out of
bounds on the other side anyway. The fact that the offset is -2048 (or
just 1 sector before the drive start) points to an intentional use of -1
or 0xFFFFFFFF somewhere rather than just an overflow, however.

The crash happens in the second session on the disk, after the track
list for the first one (which has all the audio tracks on the CD) was
parsed succesfully. And the CD mentions "this disc is not playable on
computers" so I guess at least part of this is intentional.

For reference, the CD is "Contact!" by Eiffel 65.

> In any case, it would make sense to check for the upper bound as well.
> 
> I think a better place would be when the partition or device is added in the
> first place, though (ie. that would be two places, though).

I didn't find where this happens. Any hints? It seems to be rather
complex because of interactions of cdda fs, and the "session"
partitionning system.

-- 
Adrien.

Other related posts: