Discussion:
[libdvdcss-devel] new copy protection crashes libdvdread
Raphael Wegmann
2007-07-14 18:43:59 UTC
Permalink
Hi,

it seems, that the new copy-protection system X-Project crashes
libdvdread. Here's a german article about the protection system
used by Constantin Film and EuroVideo:
http://www.heise.de/newsticker/meldung/89306

Here's the output of libdvdcss and libdvdread, when I try to view
the german version of Apocalypto:

libdvdread: Using libdvdcss version 1.2.9 for DVD access
libdvdread: Attempting to use device /dev/hdb mounted on
/media/DVDVolume for CSS authentication
libdvdcss debug: opening target `/dev/hdb'
libdvdcss debug: using libc for access
libdvdcss debug: disc is scrambled
libdvdcss debug: requesting AGID
libdvdcss debug: drive authenticated, using variant 0
libdvdcss debug: authentication established
libdvdcss debug: GetASF authenticated, ASF=1
libdvdcss debug: decrypting disc key ce:03:3e:4c:1a
libdvdcss debug: trying player key 01:af:e3:12:80
libdvdcss debug: decrypted disc key is 00:03:f5:ea:2a
libdvdcss debug: using CSS key cache dir:
/home/raphael/.dvdcss//DVDVOLUME-0000000000000000-0003f5ea2a/
libdvdcss debug: cannot open /dev/rdvd (No such file or directory)
libdvdcss error: failed to open raw device, but continuing
libdvdnav: Can't read name block. Probably not a DVD-ROM device.
libdvdnav: Unable to find map file '/home/raphael/.dvdnav/.map'
libdvdnav: DVD disk reports itself with Region mask 0x00fd0000. Regions: 2

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000148
libdvdcss debug: title key found in cache 00:00:00:00:00
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x00006be1
libdvdcss debug: title key found in cache c0:1d:e0:4d:19
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x00009fba
libdvdcss debug: title key found in cache c0:1d:e0:4d:19
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_0.VOB at 0x003580e2
libdvdcss debug: title key found in cache c0:1d:e0:4d:1a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x003580e7
libdvdcss debug: title key found in cache c0:1d:e0:4d:1a
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x0035a304
libdvdcss debug: title key found in cache c0:1d:e0:4d:1b
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0035a309
libdvdcss debug: title key found in cache c0:1d:e0:4d:1b
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_0.VOB at 0x0035b87d
libdvdcss debug: title key found in cache c0:1d:e0:4d:1c
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x0035b882
libdvdcss debug: title key found in cache c0:1d:e0:4d:1c
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_0.VOB at 0x0035e2e2
libdvdcss debug: title key found in cache c0:1d:e0:4d:1d
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_1.VOB at 0x0035e955
libdvdcss debug: title key found in cache c0:1d:e0:4d:1d
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_0.VOB at 0x002ff210
libdvdcss debug: title key found in cache c0:1d:e0:4d:19
libdvdread: Elapsed time 0
libdvdread: Found 5 VTS's
libdvdread: Elapsed time 0

*** libdvdread: CHECK_VALUE failed in ifo_read.c:435 ***
*** for vtsi_mat->vtsi_last_sector*2 <= vtsi_mat->vts_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:439 ***
*** for vtsi_mat->vtsm_vobs == 0 ||
(vtsi_mat->vtsm_vobs > vtsi_mat->vtsi_last_sector &&
vtsi_mat->vtsm_vobs < vtsi_mat->vts_last_sector) ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:442 ***
*** for vtsi_mat->vtstt_vobs == 0 ||
(vtsi_mat->vtstt_vobs > vtsi_mat->vtsi_last_sector &&
vtsi_mat->vtstt_vobs < vtsi_mat->vts_last_sector) ***

libdvdnav: ifoRead_VOBU_ADMAP vtsi failed

Here are the values who cause the crash in ifoRead_VTS():
vtsi_mat->vtsi_last_sector = 16777215
vtsi_mat->vts_last_sector = 3478820
vtsi_mat->vtsm_vobs = 45
vtsi_mat->vtsi_last_sector = 16777215
vtsi_mat->vtstt_vobs = 13318

I don't understand the problem, since neither vtsm_vobs
nor vtstt_vobs seems to be larger than vtsi_last_sector.

Anyway, I'd be glad to help in fixing that problem.

There's something strage with that DVD, if you look
at the mounted UDF filesystem:

$ ls -ioh /media/DVDVolume/VIDEO_TS/
insgesamt 14G
270 -r--r--r-- 1 raphael 18K 2036-02-07 02:58 VIDEO_TS.BUP
271 -r--r--r-- 1 raphael 24K 2036-02-07 02:58 VIDEO_TS.IFO
272 -r--r--r-- 1 raphael 54M 2036-02-07 02:58 VIDEO_TS.VOB
273 -r--r--r-- 1 raphael 575M 2036-02-07 02:58 VTS_01_0.BUP
274 -r--r--r-- 1 raphael 22K 2036-02-07 02:58 VTS_01_0.IFO
275 -r--r--r-- 1 raphael 26M 2036-02-07 02:58 VTS_01_0.VOB
276 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_01_1.VOB
276 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_01_1.VOB
276 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_01_1.VOB
277 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_01_2.VOB
278 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_01_3.VOB
279 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_01_4.VOB
280 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_01_5.VOB
281 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_01_6.VOB
282 -r--r--r-- 1 raphael 625M 2036-02-07 02:58 VTS_01_7.VOB
283 -r--r--r-- 1 raphael 7,9M 2036-02-07 02:58 VTS_02_0.BUP
284 -r--r--r-- 1 raphael 18K 2036-02-07 02:58 VTS_02_0.IFO
285 -r--r--r-- 1 raphael 10K 2036-02-07 02:58 VTS_02_0.VOB
286 -r--r--r-- 1 raphael 17M 2036-02-07 02:58 VTS_02_1.VOB
287 -r--r--r-- 1 raphael 6,8M 2036-02-07 02:58 VTS_03_0.BUP
288 -r--r--r-- 1 raphael 8,0M 2036-02-07 02:58 VTS_03_0.IFO
289 -r--r--r-- 1 raphael 10K 2036-02-07 02:58 VTS_03_0.VOB
290 -r--r--r-- 1 raphael 11M 2036-02-07 02:58 VTS_03_1.VOB
291 -r--r--r-- 1 raphael 6,3M 2036-02-07 02:58 VTS_04_0.BUP
292 -r--r--r-- 1 raphael 7,7M 2036-02-07 02:58 VTS_04_0.IFO
293 -r--r--r-- 1 raphael 10K 2036-02-07 02:58 VTS_04_0.VOB
294 -r--r--r-- 1 raphael 22M 2036-02-07 02:58 VTS_04_1.VOB
295 -r--r--r-- 1 raphael 132K 2036-02-07 02:58 VTS_05_0.BUP
296 -r--r--r-- 1 raphael 6,9M 2036-02-07 02:58 VTS_05_0.IFO
297 -r--r--r-- 1 raphael 3,3M 2036-02-07 02:58 VTS_05_0.VOB
298 -r--r--r-- 1 raphael 845M 2036-02-07 02:58 VTS_05_1.VOB
299 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_06_0.IFO
299 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_06_0.IFO
302 -r--r--r-- 1 raphael 1,0G 2036-02-07 02:58 VTS_06_0.VOB

Several files get listed more than once.

best regards
--
Raphael
Raphael Wegmann
2007-07-15 17:46:27 UTC
Permalink
Post by Raphael Wegmann
vtsi_mat->vtsi_last_sector = 16777215
vtsi_mat->vts_last_sector = 3478820
vtsi_mat->vtsm_vobs = 45
vtsi_mat->vtsi_last_sector = 16777215
vtsi_mat->vtstt_vobs = 13318
Well, please forget about those values above.

I've now put a call to ifoPrint_VTSI_MAT()
in the ifoRead_VTS() after the byte-swaps.

Here is what it looks like now:

_______________________________________________________________________

*** libdvdread: CHECK_VALUE failed in ifo_read.c:435 ***
*** for vtsi_mat->vtsi_last_sector*2 <= vtsi_mat->vts_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:439 ***
*** for vtsi_mat->vtsm_vobs == 0 ||
(vtsi_mat->vtsm_vobs > vtsi_mat->vtsi_last_sector &&
vtsi_mat->vtsm_vobs < vtsi_mat->vts_last_sector) ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:442 ***
*** for vtsi_mat->vtstt_vobs == 0 ||
(vtsi_mat->vtstt_vobs > vtsi_mat->vtsi_last_sector &&
vtsi_mat->vtstt_vobs < vtsi_mat->vts_last_sector) ***

libdvdnav: ifoRead_VOBU_ADMAP vtsi failed
[00000293] dvdnav demuxer error: cannot set title (can't decrypt DVD?)
libdvdread: Using libdvdcss version 1.2.9 for DVD access
libdvdcss debug: opening target `/dev/hdb'
libdvdcss debug: using libc for access
libdvdcss debug: disc is scrambled
libdvdcss debug: requesting AGID
libdvdcss debug: drive authenticated, using variant 0
libdvdcss debug: authentication established
libdvdcss debug: GetASF authenticated, ASF=1
libdvdcss debug: decrypting disc key ce:03:3e:4c:1a
libdvdcss debug: trying player key 01:af:e3:12:80
libdvdcss debug: decrypted disc key is 00:03:f5:ea:2a
libdvdcss debug: using CSS key cache dir:
/home/raphael/.dvdcss/DVDVOLUME-0000000000000000-0003f5ea2a/
VTS Identifier: DVDVIDEO-VTS
Last Sector of VTS: 00351524
Last Sector of VTSI: 00ffffff
Specification version number: 1.0
VTS Category: 00000000
End byte of VTSI_MAT: 000007ff
Start sector of VTSM_VOBS: 0000002d
Start sector of VTSTT_VOBS: 00003406
Start sector of VTS_PTT_SRPT: 00000001
Start sector of VTS_PGCIT: 00000002
Start sector of VTSM_PGCI_UT: 00000003
Start sector of VTS_TMAPT: 00000007
Start sector of VTSM_C_ADT: 00000005
Start sector of VTSM_VOBU_ADMAP: 0000000c
Start sector of VTS_C_ADT: 00000006
Start sector of VTS_VOBU_ADMAP: 0000000e
Video attributes of VTSM_VOBS: mpeg2 pal 16:9 only letterboxed U0
Variable Bit Rate 720x576 video
VTSM Number of Audio attributes: 1
stream 1 status: ac3 48kHz 6Ch Not specified 0
VTSM Number of Sub-picture attributes: 1
stream 1 status: -- Unspecified --
Video attributes of VTS_VOBS: mpeg2 pal 16:9 only letterboxed U0
Variable Bit Rate 720x576 video
VTS Number of Audio attributes: 3
stream 0 status: ac3 48kHz 6Ch Not specified 0
stream 1 status: dts 48kHz 5Ch Not specified 0
stream 2 status: ac3 en ( ) 48kHz 2Ch Director's comments 1 0
VTS Number of Subpicture attributes: 1
stream 0 status: Coding Mode RLE de 0 0 0 Not specified

*** libdvdread: CHECK_VALUE failed in ifo_read.c:544 ***
*** for vtsi_mat->vtsi_last_sector*2 <= vtsi_mat->vts_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:548 ***
*** for vtsi_mat->vtsm_vobs == 0 ||
(vtsi_mat->vtsm_vobs > vtsi_mat->vtsi_last_sector &&
vtsi_mat->vtsm_vobs < vtsi_mat->vts_last_sector) ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:551 ***
*** for vtsi_mat->vtstt_vobs == 0 ||
(vtsi_mat->vtstt_vobs > vtsi_mat->vtsi_last_sector &&
vtsi_mat->vtstt_vobs < vtsi_mat->vts_last_sector) ***

libdvdread: Invalid title IFO (VTS_01_0.IFO).
libdvdread: Can't open file VTS_01_0.IFO.
VTS Identifier: DVDVIDEO-VTS
Last Sector of VTS: 00351524
Last Sector of VTSI: 00000000
Specification version number: 1.0
VTS Category: 00000000
End byte of VTSI_MAT: 000007ff
Start sector of VTSM_VOBS: 0000002d
Start sector of VTSTT_VOBS: 00003406
Start sector of VTS_PTT_SRPT: 00000001
Start sector of VTS_PGCIT: 00000002
Start sector of VTSM_PGCI_UT: 00000003
Start sector of VTS_TMAPT: 00000007
Start sector of VTSM_C_ADT: 00000005
Start sector of VTSM_VOBU_ADMAP: 0000000c
Start sector of VTS_C_ADT: 00000006
Start sector of VTS_VOBU_ADMAP: 0000000e
Video attributes of VTSM_VOBS: mpeg2 pal 16:9 only letterboxed U0
Variable Bit Rate 720x576 video
VTSM Number of Audio attributes: 1
stream 1 status: ac3 48kHz 6Ch Not specified 0
VTSM Number of Sub-picture attributes: 1
stream 1 status: -- Unspecified --
Video attributes of VTS_VOBS: mpeg2 pal 16:9 only letterboxed U0
Variable Bit Rate 720x576 video
VTS Number of Audio attributes: 3
stream 0 status: ac3 48kHz 6Ch Not specified 0
stream 1 status: dts 48kHz 5Ch Not specified 0
stream 2 status: ac3 en ( ) 48kHz 2Ch Director's comments 1 0
VTS Number of Subpicture attributes: 1
stream 0 status: Coding Mode RLE de 0 0 0 Not specified

*** libdvdread: CHECK_VALUE failed in ifo_read.c:552 ***
*** for vtsi_mat->vts_ptt_srpt <= vtsi_mat->vtsi_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:553 ***
*** for vtsi_mat->vts_pgcit <= vtsi_mat->vtsi_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:554 ***
*** for vtsi_mat->vtsm_pgci_ut <= vtsi_mat->vtsi_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:555 ***
*** for vtsi_mat->vts_tmapt <= vtsi_mat->vtsi_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:556 ***
*** for vtsi_mat->vtsm_c_adt <= vtsi_mat->vtsi_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:557 ***
*** for vtsi_mat->vtsm_vobu_admap <= vtsi_mat->vtsi_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:558 ***
*** for vtsi_mat->vts_c_adt <= vtsi_mat->vtsi_last_sector ***


*** libdvdread: CHECK_VALUE failed in ifo_read.c:559 ***
*** for vtsi_mat->vts_vobu_admap <= vtsi_mat->vtsi_last_sector ***

libdvdread: Invalid title IFO (VTS_01_0.BUP).
libdvdread: Can't open file VTS_01_0.BUP.

_______________________________________________________________________


Since I don't know anything about VTSI, VTSM, etc. I can only guess
what's wrong. But after comparing with "working" DVDs, it seems
to me, that at least the values in vtsi_mat->vtsi_last_sector
(00ffffff and 00000000) are wrong.
Is that because libdvdcss returns the wrong data to libdvdread?
Is there a way to find that out?
--
Raphael
Loading...