[smartmontools-support] ATA Security Level is broken due to an incorrect bit mask

Paa Sss parkersvran at gmail.com
Fri Aug 4 10:59:13 CEST 2017


Hi.

smartctl is not reporting the ATA SECURITY LEVEL correctly, when using
the -g security option. All drives are reported as using the HIGH
security level.

This is because the bit mask of 0x0020 on line 2491 of ataprint.cpp is
incorrect.  The bit mask should be 0x0100.  The function should be:

if (!(state & 0x0100))
  s2 = "HIGH";
else
  s2 = "MAX";

This is because we want to check bit 8 of word 128 in the IDENTIFY
data, which is the security level.

With this correction the security level on my drives (both HIGH and
MAX) are reported correctly.

I tried to report this on trac, but it wouldn't let me register as it
thought I was a spammer.

Hope that helps.

Phil



More information about the Smartmontools-support mailing list