min, err := kds.ComposeTCBParts(options.MinimumTCB)
if err != nil {
return fmt.Errorf("option MinimumTCB error: %v", err)
}
if kds.TCBVersion(report.GetCurrentTcb()) < min {
return fmt.Errorf("firmware's current TCB %x is less than required %x",
report.GetCurrentTcb(), min)
}
This treats the TCB_VERSION as a single number instead of an array of lower bounds for each kind of SPL. This means the accidental position of one SPL can mask a version mismatch in a lower order version. For example, [2, 1] is greater than [1, 3], but you don't want to allow a lower SPL for the number on the right because the number on the left is higher.
We should treat the minimum TCB_VERSION as a piecewise minimum.