#745106 hdparm: Fails to unlock OPAL SSC drive ("Input/Output Error")

Package:
hdparm
Source:
hdparm
Description:
tune hard disk parameters for high performance
Submitter:
Anonymous
Date:
2017-12-29 16:24:23 UTC
Severity:
normal
#745106#5
Date:
2014-04-14 20:31:15 UTC
From:
To:
Dear Maintainer,

The hdparm tool was unable to unlock standard OPAL SSC drives.  Two
OPAL drives were tested.  The first test was with a Seagate Momentus.
The scenario is this:

  1) The drive was first put in the stock factory configuration (that
     is, on the internal SATA bus of the Thinkpad T61)

  2) The BIOS was used to create a password.

  3) Rebooted, and the BIOS rightly asked for a password, which was
     used to unlock the drive.

  4) The drive was removed and then usb-attached (using a JMicron
     bridge).

  5) The BIOS does not see USB-attached OPAL drives ("No Operating
     System").  This is a T61 limitation.

  6) An internal drive was installed simply to boot Debian.

  7) "sudo hdparm --security-unlock 1234 /dev/sdb"

     Step 7 /appears/ to work, showing this output:
     ====8<----------------------------------------
     security_password="1234"

     /dev/sdb:
     Issuing SECURITY_UNLOCK command, password="1234", user=user
     ====8<----------------------------------------

  8) fdisk /dev/sdb

     fdisk: unable to read /dev/sdb: Input/output error

Logs appeared in /var/log/kern.log:
====8<----------------------------------------
  kernel: [ 3909.886710] usb 1-3: USB disconnect, device number 3
  kernel: [ 4063.740087] usb 1-3: new high-speed USB device number 4 using ehci_hcd
  kernel: [ 4063.880965] usb 1-3: New USB device found, idVendor=152d, idProduct=2329
  kernel: [ 4063.880970] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=5
  kernel: [ 4063.880973] usb 1-3: Product: USB to ATA/ATAPI bridge
  kernel: [ 4063.880976] usb 1-3: Manufacturer: JMicron
  kernel: [ 4063.880978] usb 1-3: SerialNumber: <withheld>
  kernel: [ 4063.881796] usb-storage 1-3:1.0: Quirks match for vid 152d pid 2329: 8020
  kernel: [ 4063.881857] scsi6 : usb-storage 1-3:1.0
  kernel: [ 4064.922813] scsi 6:0:0:0: Direct-Access     ST950042 2AS                   PQ: 0 ANSI: 2 CCS
  kernel: [ 4064.925210] sd 6:0:0:0: Attached scsi generic sg2 type 0
  kernel: [ 4064.925254] sd 6:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)
  kernel: [ 4064.925988] sd 6:0:0:0: [sdb] Write Protect is off
  kernel: [ 4064.925996] sd 6:0:0:0: [sdb] Mode Sense: 28 00 00 00
  kernel: [ 4064.926722] sd 6:0:0:0: [sdb] No Caching mode page found
  kernel: [ 4064.926731] sd 6:0:0:0: [sdb] Assuming drive cache: write through
  kernel: [ 4064.929722] sd 6:0:0:0: [sdb] No Caching mode page found
  kernel: [ 4064.929730] sd 6:0:0:0: [sdb] Assuming drive cache: write through
  kernel: [ 4064.931710] sd 6:0:0:0: [sdb] Unhandled sense code
  kernel: [ 4064.931718] sd 6:0:0:0: [sdb]  Result: hostbyte=invalid driverbyte=DRIVER_SENSE
  kernel: [ 4064.931727] sd 6:0:0:0: [sdb]  Sense Key : Medium Error [current]
  kernel: [ 4064.931738] sd 6:0:0:0: [sdb]  Add. Sense: Unrecovered read error
  kernel: [ 4064.931749] sd 6:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
  kernel: [ 4064.931769] end_request: critical target error, dev sdb, sector 0
  kernel: [ 4064.931777] Buffer I/O error on device sdb, logical block 0
  ...
  kernel: [ 4733.049354] sd 6:0:0:0: [sdb] Unhandled sense code
  kernel: [ 4733.049363] sd 6:0:0:0: [sdb]  Result: hostbyte=invalid driverbyte=DRIVER_SENSE
  kernel: [ 4733.049372] sd 6:0:0:0: [sdb]  Sense Key : Medium Error [current]
  kernel: [ 4733.049382] sd 6:0:0:0: [sdb]  Add. Sense: Unrecovered read error
  kernel: [ 4733.049393] sd 6:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 20 00
  kernel: [ 4733.049414] end_request: critical target error, dev sdb, sector 0
  kernel: [ 4733.049423] quiet_error: 151 callbacks suppressed
  kernel: [ 4733.049428] Buffer I/O error on device sdb, logical block 0
  kernel: [ 4733.049439] Buffer I/O error on device sdb, logical block 1
  kernel: [ 4733.049446] Buffer I/O error on device sdb, logical block 2
  kernel: [ 4733.049453] Buffer I/O error on device sdb, logical block 3
  kernel: [ 4733.050720] sd 6:0:0:0: [sdb] Unhandled sense code
  kernel: [ 4733.050726] sd 6:0:0:0: [sdb]  Result: hostbyte=invalid driverbyte=DRIVER_SENSE
  kernel: [ 4733.050735] sd 6:0:0:0: [sdb]  Sense Key : Medium Error [current]
  kernel: [ 4733.050744] sd 6:0:0:0: [sdb]  Add. Sense: Unrecovered read error
  kernel: [ 4733.050753] sd 6:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
  kernel: [ 4733.050773] end_request: critical target error, dev sdb, sector 0
  kernel: [ 4733.050779] Buffer I/O error on device sdb, logical block 0
====8<----------------------------------------

The above scenario is on Debian Wheezy.

Another experiment was done, this time with a Hitachi (model
"hts22016k9sa00") on Ubuntu 13.10, and in that case the hdparm command
itself failed (in step 7), with the error "Input/Output Error".

#745106#10
Date:
2014-04-18 00:33:14 UTC
From:
To:
This message is being sent to you automatically in response to an email
that you sent to <nobody@remailer.paranoici.org>.

Most likely, you tried to reply to an email that has been sent through
this service. If you did not send an email to <nobody@remailer.paranoici.org>,
please ignore this message.

The Anonymous Remailer is a free service that
allows individuals including crime victims, domestic violence victims,
persons in recovery, and others, such as those living under oppressive
regimes, to communicate confidentially in a manner that ensures their
privacy under even the most adverse conditions.

To block individuals using this remailer from sending email to your
address in the future, please send a message to <mixmaster@remailer.paranoici.org>
containing the line

destination-block 745106@bugs.debian.org

anywhere in the body text of the email.  You can simply forward this
entire email to <mixmaster@remailer.paranoici.org> using your email
program for your current email address to be permanently blocked
from users of the Anonymous Remailer.

For more information about the Anonymous Remailer Administrator's
strict anti-abuse policy, please send a blank email to
<abuse@remailer.paranoici.org>

Sincerely,

#745106#15
Date:
2014-04-18 01:06:07 UTC
From:
To:
This message is being sent to you automatically in response to an email
that you sent to <mixmaster@remailer.paranoici.org>.
If you did not send such an email, please ignore this message.

This remailer is a free service that allows individuals including crime
victims, domestic violence victims, persons in recovery, and others,
such as those living under oppressive regimes, to communicate
confidentially in a manner that ensures their privacy under even the
most adverse conditions.

To obtain information on how you can use this service, please send an
email with subject "remailer-help" to <mixmaster@remailer.paranoici.org>.

Should you have received an unwelcome message through this service or to
report problems with this service, please contact the Administrator at
<abuse@remailer.paranoici.org>.

Thank you for your interest in secure and private communications,

#745106#20
Date:
2014-06-18 20:33:36 UTC
From:
To:
The problem seems to be lack of implementation.  Recently a project
has emerged that implements the OPAL SSC (self-encrpyting drive)
functionality that's missing in hdparm.

MSED (for "Manage Self Encrypting Drives") lives here:

https://github.com/r0m30/msed

The fix for hdparm, one presumes, is to make the hdparm password
submission feature dependant on msed.

#745106#25
Date:
2014-06-18 21:03:07 UTC
From:
To:
This message is being sent to you automatically in response to an email
that you sent to <nobody@remailer.paranoici.org>.

Most likely, you tried to reply to an email that has been sent through
this service. If you did not send an email to <nobody@remailer.paranoici.org>,
please ignore this message.

The Anonymous Remailer is a free service that
allows individuals including crime victims, domestic violence victims,
persons in recovery, and others, such as those living under oppressive
regimes, to communicate confidentially in a manner that ensures their
privacy under even the most adverse conditions.

To block individuals using this remailer from sending email to your
address in the future, please send a message to <mixmaster@remailer.paranoici.org>
containing the line

destination-block 745106@bugs.debian.org

anywhere in the body text of the email.  You can simply forward this
entire email to <mixmaster@remailer.paranoici.org> using your email
program for your current email address to be permanently blocked
from users of the Anonymous Remailer.

For more information about the Anonymous Remailer Administrator's
strict anti-abuse policy, please send a blank email to
<abuse@remailer.paranoici.org>

Sincerely,