Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrInvalidPropertiesResponse with WD HUH721212ALE601 #116

Open
yar-sh opened this issue Jun 25, 2024 · 0 comments
Open

ErrInvalidPropertiesResponse with WD HUH721212ALE601 #116

yar-sh opened this issue Jun 25, 2024 · 0 comments

Comments

@yar-sh
Copy link

yar-sh commented Jun 25, 2024

Hi! I just got these drives, and they've been nothing but a headache - sedutil-cli doesn't work because they are Enterprise. go-tcg-storage seems to be the only project that gets me somewhere

Here are the commands I'm running:

# ./tcgdiskstat 
2024/06/24 17:31:12 drive.Open(/dev/sda): device does not support TCG Storage Core
DEVICE     MODEL             SERIAL     FIRMWARE   PROTOCOL   SSC          STATE
/dev/sdb   HUH721212ALE601   REDACTED   0002       SATA       Enterprise   lES   
# ./gosedctl initial-setup-enterprise -d /dev/sdb -p debug -b debug -e debug
gosedctl: error: NewControllSession() failed: response was not the expected Properties call format

I've narrowed it down to this specific line: https://github.com/open-source-firmware/go-tcg-storage/blob/main/pkg/core/session.go#L464

Basically, the expected number of params is 5, but for me it's just 1.

I tried bypassing the check, by ignoring the number of params and parseHostProperties. I've substituted the return value on this line to be return *rhp, tp, nil. This did not work:

gosedctl: error: authenticating as AdminSP failed: authentication failed

Do you know what could be an issue? I'll be happy to try out anything for debugging purposes to assist

Extra output from tcgsdiag:

# ./tcgsdiag /dev/sdb
===> DRIVE SECURITY INFORMATION
2024/06/24 17:48:37 Drive identity: Protocol=SATA, Model=HUH721212ALE601, Serial=REDACTED, Firmware=0002
2024/06/24 17:48:37 SecurityProtocols: [0 1 2]
2024/06/24 17:48:37 Drive certificate:
([]*x509.Certificate) <nil>

===> TCG AUTO ComID SELF-TEST
2024/06/24 17:48:37 Allocated ComID 0x00000000
2024/06/24 17:48:37 Unable to validate allocated ComID: operation is not supported

===> TCG FEATURE DISCOVERY
(*core.Level0Discovery)(0xc0001000e0)({
  MajorVersion: (int) 0,
  MinorVersion: (int) 1,
  Vendor: ([32]uint8) (len=32 cap=32) {
    00000000  01 80 00 5f 00 19 00 00  00 00 00 00 00 00 00 00  |..._............|
    00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
  },
  TPer: (*feature.TPer)(0xc0000b44c0)({
    SyncSupported: (bool) true,
    AsyncSupported: (bool) false,
    AckNakSupported: (bool) false,
    BufferMgmtSupported: (bool) false,
    StreamingSupported: (bool) true,
    ComIDMgmtSupported: (bool) false
  }),
  Locking: (*feature.Locking)(0xc0000b44d4)({
    LockingSupported: (bool) true,
    LockingEnabled: (bool) false,
    Locked: (bool) false,
    MediaEncryption: (bool) true,
    MBREnabled: (bool) false,
    MBRDone: (bool) false,
    MBRShadowing: (bool) true
  }),
  Geometry: (*feature.Geometry)(0x6d5160)({
  }),
  SecureMsg: (*feature.SecureMsg)(<nil>),
  Enterprise: (*feature.Enterprise)(0xc0000b44f0)({
    CommonSSC: (feature.CommonSSC) {
      BaseComID: (uint16) 2046,
      NumComID: (uint16) 2
    },
    RangeCrossingBehavior: (bool) false
  }),
  OpalV1: (*feature.OpalV1)(<nil>),
  SingleUser: (*feature.SingleUser)(<nil>),
  DataStore: (*feature.DataStore)(<nil>),
  OpalV2: (*feature.OpalV2)(<nil>),
  Opalite: (*feature.Opalite)(<nil>),
  PyriteV1: (*feature.PyriteV1)(<nil>),
  PyriteV2: (*feature.PyriteV2)(<nil>),
  RubyV1: (*feature.RubyV1)(<nil>),
  LockingLBA: (*feature.LockingLBA)(<nil>),
  BlockSID: (*feature.BlockSID)(<nil>),
  NamespaceLocking: (*feature.NamespaceLocking)(<nil>),
  DataRemoval: (*feature.DataRemoval)(<nil>),
  NamespaceGeometry: (*feature.NamespaceGeometry)(<nil>),
  SeagatePorts: (*feature.SeagatePorts)(<nil>),
  UnknownFeatures: ([]uint16) (len=1 cap=4) {
    (uint16) 49152
  }
})

===> TCG ADMIN SP SESSION
2024/06/24 17:48:37 Auto-allocation ComID test failed earlier, selecting first available base ComID
2024/06/24 17:48:37 Selecting Enterprise ComID
2024/06/24 17:48:37 Creating control session with ComID 0x000007fe
2024/06/24 17:48:37 s.NewControlSession failed: response was not the expected Properties call format
2024/06/24 17:48:37 No control session, unable to continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant