[libdvdcss-devel] Bug concerning RPC-1-patched drives

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jan 22 13:56:52 CET 2012


On Sun, Jan 22, 2012 at 05:31:14AM -0700, danhaim at danhaim.com wrote:
> Hi,
> I think I found a bug in libdvdcss where drives flashed with
> RPC-1-patched firmware are concerned. Many times these drives will not
> report themselves as RPC-1 but would rather not recognize the relevant
> ioctls at all (like actual old RPC-1 drives' behavior). This causes
> ioctl_ReportRPC to fail and _dvdcss_test, in turn, to report a -2 return
> code, which prevents the disc from being authenticated.
> 
> This leads to two problems -
> 1) libdvdcss skips the key method and goes straight to brute force
> cracking - which takes a significant amount of time and in this case is
> unnecessary,
> 2) My own (RPC-1-patched) DVD drive had an even worse case - It would
> not allow encrypted VOB files to be read at all until the disc is
> authenticated, which causes the brute force approach to fail and in turn
> not allow playback of encrypted DVDs at all.
> 
> I believe that the default behavior should be changed such that if
> ioctl_ReportRPC fails, we assume the drive is RPC-1 and attempt to
> authenticate the disc using the key method anyway. If it succeeds,
> great, if not, we fall-back like usual.
> 
> The relevant code is in function _dvdcss_test in css.c :
> 
> 
> i_ret = ioctl_ReportRPC( dvdcss->i_fd, &i_type, &i_mask, &i_rpc);
> 
> if( i_ret < 0 )
> {
> -        print_error( dvdcss, "css error: could not get RPC status" );
> -        return -2;
> +        print_debug( dvdcss, "css error: could not get RPC status,
> assuming RPC-1 drive" );
> +        i_rpc = 0;
> +        i_type = 0;
> +        i_mask = 0;
> }
> 
> 
> I tested this and was able to play encrypted DVDs with the modified
> libdvdcss library (was completely unable before).

I sent a patch a long time ago that handles a similar case, but
for RPC-less drives.
Does someone have it at hand? It would be good to know if it solves
your issue, too.
I think in that case the drive did not respond to the corresponding
ioctls at all I think.


More information about the libdvdcss-devel mailing list