Aaru attempts to dump CSS title keys from non-optical media #649

Open
opened 2026-01-29 15:25:06 +00:00 by claunia · 0 comments
Owner

Originally created by @TheRogueArchivist on GitHub (Jan 19, 2021).

Originally assigned to: @FakeShemp on GitHub.

Prerequisites

  • Are you running the latest version?
  • Can you reproduce the problem in the debug version?

Check and fill as appropriate:

  • I was running Aaru under Windows 10...
  • ...in 64-bit
  • ...using an Intel / AMD processor
  • Device manufacturer: Multiple

Description

When dumping non-optical media (tested Zip-100 and CF, both through USB), Aaru prints "Title keys dumping is enabled. This will be very slow." as if the media is a DVD protected by CSS. Then at hashing, Aaru crashes with an error relating to CSS DVDs. CDs seem to dump normally. Dumping with --title-keys disabled seems to successfully mitigate this bug.

Exact command line used:

aaru m dump M: 001_aaru_5.3.aaruf

Output of command execution with debug output enabled

aaru 5.2.99.3380-alpha+1354846d built by DESKTOP-8B4K7NM in Debug, modified
Copyright c 2011-2021 Natalia Portillo

DEBUG (Dump-Media command): --cicm-xml=
DEBUG (Dump-Media command): --debug=True
DEBUG (Dump-Media command): --device=M:
DEBUG (Dump-Media command): --encoding=
DEBUG (Dump-Media command): --first-pregap=False
DEBUG (Dump-Media command): --fix-offset=True
DEBUG (Dump-Media command): --force=False
DEBUG (Dump-Media command): --format=
DEBUG (Dump-Media command): --metadata=True
DEBUG (Dump-Media command): --options=
DEBUG (Dump-Media command): --output=001_aaru_5.3.aaruf
DEBUG (Dump-Media command): --persistent=False
DEBUG (Dump-Media command): --resume=True
DEBUG (Dump-Media command): --retry-passes=5
DEBUG (Dump-Media command): --skip=512
DEBUG (Dump-Media command): --stop-on-error=False
DEBUG (Dump-Media command): --trim=True
DEBUG (Dump-Media command): --verbose=False
DEBUG (Dump-Media command): --subchannel=any
DEBUG (Dump-Media command): --private=False
DEBUG (Dump-Media command): --fix-subchannel-position=True
DEBUG (Dump-Media command): --retry-subchannel=True
DEBUG (Dump-Media command): --fix-subchannel=False
DEBUG (Dump-Media command): --fix-subchannel-crc=False
DEBUG (Dump-Media command): --generate-subchannels=False
DEBUG (Dump-Media command): --skip-cdiready-hole=True
DEBUG (Dump-Media command): --eject=False
DEBUG (Dump-Media command): --max-blocks=64
DEBUG (Dump-Media command): --use-buffered-reads=True
DEBUG (Dump-Media command): --store-encrypted=True
DEBUG (Dump-Media command): --title-keys=True
DEBUG (Dump-Media command): Parsed options:
DEBUG (SCSI Device): INQUIRY took 0.591 ms.
DEBUG (SCSI Device): INQUIRY took 0.2847 ms.
DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 0.7199 ms.
Output image format: Aaru Format.
Device not in database, please create a device report and attach it to a Github issue.
DEBUG (SCSI Device): TEST UNIT READY took 0.2014 ms.

DEBUG (SCSI Device): READ CAPACITY took 0.2817 ms.
DEBUG (SCSI Device): INQUIRY took 0.5885 ms.
Requesting MODE SENSE (10).
DEBUG (SCSI Device): MODE SENSE(10) took 0.2508 ms.
DEBUG (SCSI Device): MODE SENSE(10) took 0.233 ms.
Requesting MODE SENSE (6).
DEBUG (SCSI Device): MODE SENSE(6) took 0.2419 ms.
DEBUG (SCSI Device): READ (6) took 0.7534 ms.
DEBUG (SCSI Device): READ (10) took 0.6301 ms.
DEBUG (SCSI Device): READ (12) took 1.0691 ms.
DEBUG (SCSI Device): READ (16) took 1.1069 ms.
DEBUG (SCSI Device): SEEK (6) took 0.7043 ms.
DEBUG (SCSI Device): SEEK (10) took 0.7141 ms.
Using SCSI READ (6) command.
Media has 31232 blocks of 512 bytes/each. (for a total of 15.250 MiB)
DEBUG (SCSI Device): READ (6) took 6.7376 ms.
Device reports 31232 blocks (15990784 bytes).
Device can read 64 blocks at a time.
Device reports 512 bytes per logical block.
Device reports 512 bytes per physical block.
SCSI device type: DirectAccess.
SCSI medium type: 0.
SCSI density type: 0.
SCSI floppy mode page present: False.
Media identified as Unknown
Reading 64 sectors at a time.
DEBUG (Aaru Format plugin): Got a shift of 12 for 4096 sectors per block
DEBUG (Aaru Format plugin): In memory DDT?: True
Title keys dumping is enabled. This will be very slow.
...
Reading sector 31168 of 31232 (1.686 MiB/sec.)DEBUG (SCSI Device): READ (6) took 6.8709 ms.

Dump finished in 9.9470552 seconds.
Average dump speed 4518.251 KiB/sec.
Average write speed 2482.773 KiB/sec.
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Collections.Generic.KeyNotFoundException: The given key 'DVD_DiscKey_Decrypted' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Aaru.Core.Devices.Dumping.Dump.Sbc(Dictionary`2 mediaTags, MediaType dskType, Boolean opticalDisc, Dump dvdDecrypt) in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Core\Devices\Dumping\Sbc\Dump.cs:line 742
   at Aaru.Core.Devices.Dumping.Dump.Scsi() in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Core\Devices\Dumping\SCSI.cs:line 251
   at Aaru.Core.Devices.Dumping.Dump.Start() in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Core\Devices\Dumping\Dump.cs:line 239
   at Aaru.Commands.Media.DumpMediaCommand.Invoke(Boolean debug, Boolean verbose, String cicmXml, String devicePath, Boolean resume, String encoding, Boolean firstPregap, Boolean fixOffset, Boolean force, Boolean metadata, Boolean trim, String outputPath, String options, Boolean persistent, UInt16 retryPasses, UInt32 skip, Byte speed, Boolean stopOnError, String format, String subchannel, Boolean private, Boolean fixSubchannelPosition, Boolean retrySubchannel, Boolean fixSubchannel, Boolean fixSubchannelCrc, Boolean generateSubchannels, Boolean skipCdiReadyHole, Boolean eject, UInt32 maxBlocks, Boolean useBufferedReads, Boolean storeEncrypted, Boolean titleKeys) in C:\Users\silas\Desktop\GIT\Aaru\Aaru\Commands\Media\Dump.cs:line 680
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__9_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext()

Media details

Multiple

Originally created by @TheRogueArchivist on GitHub (Jan 19, 2021). Originally assigned to: @FakeShemp on GitHub. ### Prerequisites * [X] Are you running the latest version? * [X] Can you reproduce the problem in the debug version? ### Check and fill as appropriate: * [X] I was running Aaru under Windows 10... * [X] ...in 64-bit * [X] ...using an Intel / AMD processor * **Device manufacturer**: Multiple ### Description <!-- Description of the bug --> When dumping non-optical media (tested Zip-100 and CF, both through USB), Aaru prints "Title keys dumping is enabled. This will be very slow." as if the media is a DVD protected by CSS. Then at hashing, Aaru crashes with an error relating to CSS DVDs. CDs seem to dump normally. Dumping with --title-keys disabled seems to successfully mitigate this bug. ### Exact command line used: `aaru m dump M: 001_aaru_5.3.aaruf` ### Output of command execution with debug output enabled ``` aaru 5.2.99.3380-alpha+1354846d built by DESKTOP-8B4K7NM in Debug, modified Copyright c 2011-2021 Natalia Portillo DEBUG (Dump-Media command): --cicm-xml= DEBUG (Dump-Media command): --debug=True DEBUG (Dump-Media command): --device=M: DEBUG (Dump-Media command): --encoding= DEBUG (Dump-Media command): --first-pregap=False DEBUG (Dump-Media command): --fix-offset=True DEBUG (Dump-Media command): --force=False DEBUG (Dump-Media command): --format= DEBUG (Dump-Media command): --metadata=True DEBUG (Dump-Media command): --options= DEBUG (Dump-Media command): --output=001_aaru_5.3.aaruf DEBUG (Dump-Media command): --persistent=False DEBUG (Dump-Media command): --resume=True DEBUG (Dump-Media command): --retry-passes=5 DEBUG (Dump-Media command): --skip=512 DEBUG (Dump-Media command): --stop-on-error=False DEBUG (Dump-Media command): --trim=True DEBUG (Dump-Media command): --verbose=False DEBUG (Dump-Media command): --subchannel=any DEBUG (Dump-Media command): --private=False DEBUG (Dump-Media command): --fix-subchannel-position=True DEBUG (Dump-Media command): --retry-subchannel=True DEBUG (Dump-Media command): --fix-subchannel=False DEBUG (Dump-Media command): --fix-subchannel-crc=False DEBUG (Dump-Media command): --generate-subchannels=False DEBUG (Dump-Media command): --skip-cdiready-hole=True DEBUG (Dump-Media command): --eject=False DEBUG (Dump-Media command): --max-blocks=64 DEBUG (Dump-Media command): --use-buffered-reads=True DEBUG (Dump-Media command): --store-encrypted=True DEBUG (Dump-Media command): --title-keys=True DEBUG (Dump-Media command): Parsed options: DEBUG (SCSI Device): INQUIRY took 0.591 ms. DEBUG (SCSI Device): INQUIRY took 0.2847 ms. DEBUG (ATA Device): IDENTIFY PACKET DEVICE took 0.7199 ms. Output image format: Aaru Format. Device not in database, please create a device report and attach it to a Github issue. DEBUG (SCSI Device): TEST UNIT READY took 0.2014 ms. DEBUG (SCSI Device): READ CAPACITY took 0.2817 ms. DEBUG (SCSI Device): INQUIRY took 0.5885 ms. Requesting MODE SENSE (10). DEBUG (SCSI Device): MODE SENSE(10) took 0.2508 ms. DEBUG (SCSI Device): MODE SENSE(10) took 0.233 ms. Requesting MODE SENSE (6). DEBUG (SCSI Device): MODE SENSE(6) took 0.2419 ms. DEBUG (SCSI Device): READ (6) took 0.7534 ms. DEBUG (SCSI Device): READ (10) took 0.6301 ms. DEBUG (SCSI Device): READ (12) took 1.0691 ms. DEBUG (SCSI Device): READ (16) took 1.1069 ms. DEBUG (SCSI Device): SEEK (6) took 0.7043 ms. DEBUG (SCSI Device): SEEK (10) took 0.7141 ms. Using SCSI READ (6) command. Media has 31232 blocks of 512 bytes/each. (for a total of 15.250 MiB) DEBUG (SCSI Device): READ (6) took 6.7376 ms. Device reports 31232 blocks (15990784 bytes). Device can read 64 blocks at a time. Device reports 512 bytes per logical block. Device reports 512 bytes per physical block. SCSI device type: DirectAccess. SCSI medium type: 0. SCSI density type: 0. SCSI floppy mode page present: False. Media identified as Unknown Reading 64 sectors at a time. DEBUG (Aaru Format plugin): Got a shift of 12 for 4096 sectors per block DEBUG (Aaru Format plugin): In memory DDT?: True Title keys dumping is enabled. This will be very slow. ... Reading sector 31168 of 31232 (1.686 MiB/sec.)DEBUG (SCSI Device): READ (6) took 6.8709 ms. Dump finished in 9.9470552 seconds. Average dump speed 4518.251 KiB/sec. Average write speed 2482.773 KiB/sec. Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key 'DVD_DiscKey_Decrypted' was not present in the dictionary. at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Aaru.Core.Devices.Dumping.Dump.Sbc(Dictionary`2 mediaTags, MediaType dskType, Boolean opticalDisc, Dump dvdDecrypt) in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Core\Devices\Dumping\Sbc\Dump.cs:line 742 at Aaru.Core.Devices.Dumping.Dump.Scsi() in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Core\Devices\Dumping\SCSI.cs:line 251 at Aaru.Core.Devices.Dumping.Dump.Start() in C:\Users\silas\Desktop\GIT\Aaru\Aaru.Core\Devices\Dumping\Dump.cs:line 239 at Aaru.Commands.Media.DumpMediaCommand.Invoke(Boolean debug, Boolean verbose, String cicmXml, String devicePath, Boolean resume, String encoding, Boolean firstPregap, Boolean fixOffset, Boolean force, Boolean metadata, Boolean trim, String outputPath, String options, Boolean persistent, UInt16 retryPasses, UInt32 skip, Byte speed, Boolean stopOnError, String format, String subchannel, Boolean private, Boolean fixSubchannelPosition, Boolean retrySubchannel, Boolean fixSubchannel, Boolean fixSubchannelCrc, Boolean generateSubchannels, Boolean skipCdiReadyHole, Boolean eject, UInt32 maxBlocks, Boolean useBufferedReads, Boolean storeEncrypted, Boolean titleKeys) in C:\Users\silas\Desktop\GIT\Aaru\Aaru\Commands\Media\Dump.cs:line 680 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseHelp>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseTypoCorrections>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__20_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__18_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__9_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext() ``` ### Media details <!-- Photo, EAN-13, if possible eBay link --> Multiple
claunia added the bug label 2026-01-29 15:25:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aaru-dps/Aaru-aaru-dps#649