Skip to content

Release v1.8.4 RPM#175

Merged
jialez0 merged 3 commits into
openanolis:mainfrom
jialez0:release-1.8.4
May 25, 2026
Merged

Release v1.8.4 RPM#175
jialez0 merged 3 commits into
openanolis:mainfrom
jialez0:release-1.8.4

Conversation

@jialez0
Copy link
Copy Markdown
Collaborator

@jialez0 jialez0 commented May 20, 2026

No description provided.

Signed-off-by: Jiale Zhang <xinjian.zjl@alibaba-inc.com>
@shankailun-aliyun
Copy link
Copy Markdown
Collaborator

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun
Copy link
Copy Markdown
Collaborator

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

The unique index on `instance_id` (VARCHAR(255), utf8mb4) overflowed
MySQL InnoDB's 767-byte key length limit (255 * 4 = 1020 bytes),
causing `CREATE UNIQUE INDEX ... ON aa_instance_heartbeats(instance_id)`
to fail with "Specified key was too long" during gateway startup and
aborting the migration.

Switch the MySQL DDL to a 191-char prefix index, which keeps the index
key under 767 bytes (191 * 4 = 764) while remaining longer than any
realistic instance_id value. SQLite path is unaffected.

Signed-off-by: Jiale Zhang <xinjian.zjl@alibaba-inc.com>
@shankailun-aliyun
Copy link
Copy Markdown
Collaborator

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun
Copy link
Copy Markdown
Collaborator

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

The previous verify path built an SM2 PKey and ran the signature through
OpenSSL's EVP_DigestVerify (effectively `Verifier::new(SM3, pkey)`).
That path either applies the GB/T 32918 ZA pre-processing
(SM3(ENTL || ID || a || b || xG || yG || xA || yA) prepended to the
message) or, on a plain EC PKey, silently dispatches to ECDSA verify.
Neither matches what TPM2 produces: per the TPM 2.0 spec the SM2 quote
signs SM3(attestBody) directly, with no ZA mixing and no DER wrapping.
End-to-end attestation against a real Hygon TPM therefore failed with
"Verify Hygon TPM quote signature failed" even when the AK, evidence
body, and signature were all correct.

Drop the OpenSSL high-level verifier and implement the SM2 verify
equation from GB/T 32918.2-2016 §7.1 directly using BigNum/EcPoint:

  e   = SM3(attestBody)
  t   = (r + s) mod n           with t != 0
  P   = s * G + t * Q
  ok iff (e + P.x) mod n == r

Range-check r and s against [1, n-1] up front and reject t == 0 to
match the spec. Reuse the existing extracted (r, s) from the marshalled
TPM signature; create_sm2_pkey is left in place because it is still
used to compare AK pubkeys against the keylime registrar.

Signed-off-by: Jiale Zhang <xinjian.zjl@alibaba-inc.com>
@shankailun-aliyun
Copy link
Copy Markdown
Collaborator

@jialez0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun
Copy link
Copy Markdown
Collaborator

@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

@jialez0 jialez0 merged commit f32cfba into openanolis:main May 25, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants