Discussion:
Special kernel needed for Hdparm through USB?
(too old to reply)
Markus Robert Kessler
2022-09-04 06:41:45 UTC
Permalink
On Sat, 03 Sep 2022 14:45:20 -0400, Markus Robert Kessler
Hi all,
I just tried to prepare an external harddisk by setting a password to
make it safe for travelling.
All other harddisks like (older) Samsung, Western Digital, Hitachi etc.
accept locking / unlocking via password through hdparm commands via USB
$ hdparm --user-master u --security-set-pass 'newpass' /dev/sdb
security_password: "newpass"
Issuing SECURITY_SET_PASS command, password="newpass", user=user,
mode=high The running kernel lacks CONFIG_IDE_TASK_IOCTL support for
this device.
SECURITY_SET_PASS: Invalid argument
B.t.w., I cannot even remove or overwrite the manufacturer's secret
master password. So, this is a severe security risk since someone could
know it and unlock those drives.
Has anyone already managed to lock / unlock such a drive?
Any idea how to proceed?
Are you using a usb connection?
https://sourceforge.net/p/hdparm/support-requests/7/
Regards, Dave Hodgins
Hi,

and, sorry if confusing with new "fork" of this thread :-)

@ Dave:

Thanks for that link. It looks to me as if there has to be a special
kernel, capable of executing this "CONFIG_IDE_TASK_IOCTL" command?

In the document above, it seems, that no one cares about the request for
implementing, or taking this functionality back into the kernel again.

This is somehow puzzling me, because in the past, say, 4-6 years, I had a
similar issue with mechanical disks, but with nowadays' kernels most of
the drives can be accessed without any trouble.

Has anyone already tried to activate mentioned method in the kernel
sources?

I'd just be happy if it was possible to deactivate or overwrite the
master password, so that I can, at least, use it as an internal drive in
a different notebook.

Thanks a lot,
best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Richard Kettlewell
2022-09-04 08:10:17 UTC
Permalink
Post by Markus Robert Kessler
Are you using a usb connection?
https://sourceforge.net/p/hdparm/support-requests/7/
Regards, Dave Hodgins
Hi,
and, sorry if confusing with new "fork" of this thread :-)
Please don’t do that again, it makes it hard to navigate the thread.
Post by Markus Robert Kessler
Thanks for that link. It looks to me as if there has to be a special
kernel, capable of executing this "CONFIG_IDE_TASK_IOCTL" command?
This certainly is a red herring; CONFIG_IDE_TASK_IOCTL has not existed
for years and was only relevant to old-style IDE.
--
https://www.greenend.org.uk/rjk/
Markus Robert Kessler
2022-09-04 08:44:05 UTC
Permalink
Post by Richard Kettlewell
Post by Markus Robert Kessler
Are you using a usb connection?
https://sourceforge.net/p/hdparm/support-requests/7/
Regards, Dave Hodgins
Hi,
and, sorry if confusing with new "fork" of this thread :-)
Please don’t do that again, it makes it hard to navigate the thread.
Post by Markus Robert Kessler
Thanks for that link. It looks to me as if there has to be a special
kernel, capable of executing this "CONFIG_IDE_TASK_IOCTL" command?
This certainly is a red herring; CONFIG_IDE_TASK_IOCTL has not existed
for years and was only relevant to old-style IDE.
According to what I've just seen, quite the opposite seems to apply:

This is not only an alert, all hdparm-related security modifications to
the drive are really failing.

Well, meanwhile I found a Samsung EVO 840 in one of my notebooks. I set
the user password to NULL and took it out. The drive could be accessed
via hdparm through USB easily. No error occured.

Only these new Samsung EVO 870 drives throw above quoted error alert and
refuse to do the demanded modification.

Well, maybe Samsung took old code here (why should they do this?).

Anyway, someone managed to activate this method in the kernel?

Best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Markus Robert Kessler
2022-09-04 10:55:15 UTC
Permalink
Post by Markus Robert Kessler
Post by Richard Kettlewell
Post by Markus Robert Kessler
Are you using a usb connection?
https://sourceforge.net/p/hdparm/support-requests/7/
Regards, Dave Hodgins
Hi,
and, sorry if confusing with new "fork" of this thread :-)
Please don’t do that again, it makes it hard to navigate the thread.
Post by Markus Robert Kessler
Thanks for that link. It looks to me as if there has to be a special
kernel, capable of executing this "CONFIG_IDE_TASK_IOCTL" command?
This certainly is a red herring; CONFIG_IDE_TASK_IOCTL has not existed
for years and was only relevant to old-style IDE.
Hi,
Post by Markus Robert Kessler
This is not only an alert, all hdparm-related security modifications to
the drive are really failing.
Here I have to correct myself. I accomplished some more tests, and I
found out, that only one out of 3 USB-to-SATA converters makes trouble.
May this be called a "red herring", yes :-)

It looks like a compatibility issue between the controller and its
firmware, and the kernel and its USB driver.

I have no idea why this is so a widely spread problem, reading about it
over and over. Probably, a huge number of manufacturers of these
converters are not implementing their stuff fully complying with the spec.
Post by Markus Robert Kessler
Well, meanwhile I found a Samsung EVO 840 in one of my notebooks. I set
the user password to NULL and took it out. The drive could be accessed
via hdparm through USB easily. No error occured.
Only these new Samsung EVO 870 drives throw above quoted error alert and
refuse to do the demanded modification.
Again, I have to correct:
I used a fully working adapter from Logilink together with EVO 840, and a
not-complying one, also from Logilink with a different serial number
(39993001701) which just allows to mount unprotected drives, and which
not even displays HPA info etc, together with EVO 870.

Not surprising that EVO 870 made more trouble than EVO 840 did...

Thanks,
best regards,

Markus
--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm
Paul
2022-09-04 12:45:31 UTC
Permalink
Post by Markus Robert Kessler
On Sat, 03 Sep 2022 14:45:20 -0400, Markus Robert Kessler
Hi all,
I just tried to prepare an external harddisk by setting a password to
make it safe for travelling.
All other harddisks like (older) Samsung, Western Digital, Hitachi etc.
accept locking / unlocking via password through hdparm commands via USB
$ hdparm --user-master u --security-set-pass 'newpass' /dev/sdb
security_password: "newpass"
Issuing SECURITY_SET_PASS command, password="newpass", user=user,
mode=high The running kernel lacks CONFIG_IDE_TASK_IOCTL support for
this device.
SECURITY_SET_PASS: Invalid argument
B.t.w., I cannot even remove or overwrite the manufacturer's secret
master password. So, this is a severe security risk since someone could
know it and unlock those drives.
Has anyone already managed to lock / unlock such a drive?
Any idea how to proceed?
Are you using a usb connection?
https://sourceforge.net/p/hdparm/support-requests/7/
Regards, Dave Hodgins
Hi,
and, sorry if confusing with new "fork" of this thread :-)
Thanks for that link. It looks to me as if there has to be a special
kernel, capable of executing this "CONFIG_IDE_TASK_IOCTL" command?
In the document above, it seems, that no one cares about the request for
implementing, or taking this functionality back into the kernel again.
This is somehow puzzling me, because in the past, say, 4-6 years, I had a
similar issue with mechanical disks, but with nowadays' kernels most of
the drives can be accessed without any trouble.
Has anyone already tried to activate mentioned method in the kernel
sources?
I'd just be happy if it was possible to deactivate or overwrite the
master password, so that I can, at least, use it as an internal drive in
a different notebook.
Thanks a lot,
best regards,
Markus
https://serverfault.com/questions/712849/how-to-unlock-an-ssd-disk-with-hdparm

https://www.thomas-krenn.com/en/wiki/Perform_a_SSD_Secure_Erase

Security:
Master password revision code = 65534
supported
not enabled
not locked does being not-frozen, start this timer?
not frozen -------------------------------------------------------+
not expired: security count |
supported: enhanced erase |
2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT. <--+

https://web.archive.org/web/20141115020359/http://ipv5.wordpress.com/2008/04/14/list-of-hard-disk-ata-master-passwords/

X79 ICH10 - booted my Gentoo install, emerged hdparm, hdparm -I /dev/sda, 870 EVO (250GB)

Master password revision code = 65534
supported
not enabled
not locked
frozen <------------------ Intel Motherboard ports are not good for this exercise
not expired: security count
supported: enhanced erase

Next, I installed a Promise Ultra100 IDE card, then
connected a Startech IDE2SAT adapter, plugged adapter
into Samsung 870 EVO SATA 250GB drive. Used two OSes
with no special kernel, got

Master password revision code = 65534
supported
not enabled
not locked
not frozen <------------------ This worked with a JMB363 IDE as well, plus the IDE2SAT adapter
not expired: security count
supported: enhanced erase

[Picture]

Loading Image...

Paul
David W. Hodgins
2022-09-04 18:09:45 UTC
Permalink
Post by Markus Robert Kessler
Thanks for that link. It looks to me as if there has to be a special
kernel, capable of executing this "CONFIG_IDE_TASK_IOCTL" command?
In the document above, it seems, that no one cares about the request for
implementing, or taking this functionality back into the kernel again.
This is somehow puzzling me, because in the past, say, 4-6 years, I had a
similar issue with mechanical disks, but with nowadays' kernels most of
the drives can be accessed without any trouble.
Has anyone already tried to activate mentioned method in the kernel
sources?
I'd just be happy if it was possible to deactivate or overwrite the
master password, so that I can, at least, use it as an internal drive in
a different notebook.
The "CONFIG_IDE_TASK_IOCTL" suggestion is a misleading part of the error message
due to the age of the code in hdparm.

The problem is that a usb interface to a sata devices filters out the ioctl
commands that are not relevant to a usb device.

It's also quite possible that the firmware on the hard drive doesn't implement
the processing of the ioctl commands properly, even when using a sata connection
directly to the controller on the motherboard.

Regards, Dave Hodgins

Loading...