[Bug 29667] New: Dragon Age: Origins DVD authenticity checks fail (DVD_LAYER_DESCRIPTOR big endian values need to be converted host endianness before being returned to caller)
http://bugs.winehq.org/show_bug.cgi?id=29667 Bug #: 29667 Summary: Dragon Age: Origins DVD authenticity checks fail (DVD_LAYER_DESCRIPTOR big endian values need to be converted host endianness before being returned to caller) Product: Wine Version: 1.3.37 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs(a)winehq.org ReportedBy: focht(a)gmx.net Classification: Unclassified Hello, continuation of bug 26459 After all DVD structures are correctly byte-padded, the DVD authenticity checks still fail. The loader checks various fields in the DVD_LAYER_DESCRIPTOR returned from IOCTL_DVD_READ_STRUCTURE. DVD_LAYER_DESCRIPTOR description (there are several similar online resources): http://www.osronline.com/ddkx/storage/k306_3mia.htm --- snip --- typedef struct _DVD_LAYER_DESCRIPTOR { UCHAR BookVersion : 4; UCHAR BookType : 4; UCHAR MinimumRate : 4; UCHAR DiskSize : 4; UCHAR LayerType : 4; UCHAR TrackPath : 1; UCHAR NumberOfLayers : 2; UCHAR Reserved1 : 1; UCHAR TrackDensity : 4; UCHAR LinearDensity : 4; ULONG StartingDataSector; ULONG EndDataSector; ULONG EndLayerZeroSector; UCHAR Reserved5 : 7; UCHAR BCAFlag : 1; UCHAR Reserved6; } DVD_LAYER_DESCRIPTOR, *PDVD_LAYER_DESCRIPTOR; --- snip --- The problematic part are the following fields: --- snip --- StartingDataSector Specifies the first block that contains user data. This member can have one of the following values: Value Meaning 0x30000 An initial block value of 0x30000 indicates that the media type is DVD-ROM or DVD-R/-RW 0x31000 An initial block value of 0x30000 indicates that the media type is DVD-RAM or DVD+RW EndDataSector Specifies the last sector of the user data in the last layer of the media. EndLayerZeroSector Specifies the last sector of the user data in layer zero. If this media does not use the opposite track path method and contains multiple layers, this value is set to zero. --- snip --- "Text" version of SCSI Multi-Media Commands - 6 (MMC-6) PDF: http://hackipedia.org/Hardware/SCSI/Multimedia/SCSI%20Multimedia%20Commands%... A bit hard to read due to formatting, I reformatted the relevant clause: --- quote --- 3.8 Bit and byte ordering This sub-clause describes the representation of fields in a table that defines the format of a SCSI structure (e.g., the format of a CDB). If a field consists of more than one bit and contains a single value (e.g., a number), the least significant bit (LSB) is shown on the right and the most significant bit (MSB) is shown on the left (e.g., in a byte, bit 7 is the MSB and is shown on the left; and bit 0 is the LSB and is shown on the right). The MSB and LSB are not labeled if the field consists of 8 or fewer bits. If a field consists of more than one byte and contains a single value, the byte containing the MSB is stored at the lowest address and the byte containing the LSB is stored at the highest address (i.e., big-endian byte ordering). ... --- quote --- These ULONGs need to be byte-swapped (host endianness) before being returned to caller. The internal info string (containing formatted DVD_LAYER_DESCRIPTOR values): "DVD-ROM, ReadOnly, OTP, 2, 0x30000, 0xfcffff, 0x22577f, silver media, ," The game loader code verifies the "StartingDataSector" value against 0x300 and 0x310 which fails because Wine doesn't do endianness conversion. Code: http://source.winehq.org/git/wine.git/blob/f082eac97c3ec71de58eea85bb4de5a12... Wine's "__APPLE__" code already does it right, using OSReadBigInt32() for big endian to host endianness conversion. Code: http://source.winehq.org/git/wine.git/blob/f082eac97c3ec71de58eea85bb4de5a12... With that fix in place at least the DVD_LAYER_DESCRIPTOR data is now properly verified. The internal info string will now look like this: "DVD-ROM, ReadOnly, OTP, 2, 0x300, 0xfffffc00, 0x7f572200, silver media, ," Though it still fails - another bug ;-) Regards -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |obfuscation Depends on| |26459 --- Comment #1 from Anastasius Focht <focht(a)gmx.net> 2012-01-21 05:59:13 CST --- Hello, filling fields ... Regards -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29669 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 Cùran <debian(a)carbon-project.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |debian(a)carbon-project.org -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 Bug 29667 depends on bug 26459, which changed state. Bug 26459 Summary: Dragon Age: Origins DVD authenticity checks fail (IOCTL_DVD_READ_STRUCTURE fails, structures in "ntddcdvd.h" need to be byte packed with no padding) http://bugs.winehq.org/show_bug.cgi?id=26459 What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 --- Comment #2 from Dan Kegel <dank(a)kegel.com> 2012-01-24 23:22:20 CST --- Created attachment 38540 --> http://bugs.winehq.org/attachment.cgi?id=38540 draft patch How's this look? (I'll send it in once I have a patch for bug 29669, too) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 Saulius K. <saulius2(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2(a)gmail.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dank(a)kegel.com --- Comment #3 from Dan Kegel <dank(a)kegel.com> 2012-02-09 17:57:21 CST --- Patches sent, see http://www.winehq.org/pipermail/wine-patches/2012-February/111467.html et al -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38540|0 |1 is obsolete| | -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |6077b623f299861732d1f2ea1f3 | |ab5af09d03adf Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Austin English <austinenglish(a)gmail.com> 2012-02-14 13:33:45 CST --- (In reply to comment #3)
Patches sent, see http://www.winehq.org/pipermail/wine-patches/2012-February/111467.html et al
http://source.winehq.org/git/wine.git/commitdiff/6077b623f299861732d1f2ea1f3... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=29667 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard(a)winehq.org> 2012-02-17 13:50:41 CST --- Closing bugs fixed in 1.4-rc4. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org