core/ledger: LeaseAccept rejects every accept for a zero-expiry certificate while Lease accepts it - missing != 0 guard desyncs lease/accept expiry checks
Report
Summary
A provider-signed performance certificate with ExpiresAt == 0 passes content verification and gossip ingest, which perform no expiry check at all, and passes the lease-side expiry check, which guards cert.ExpiresAt != 0. But validateAndAddLeaseAccept checks startTime > certInfo.ExpiresAt with no such guard, so every accept for that provider always fails with certificate expired (startTime is ~1.7e18 ns). The provider's leases can be created but never accepted, stranding consumer escrow until cancel. The fix is the same != 0 guard its two sibling validators already have.
Impact
- A provider whose certificate carries
ExpiresAt == 0can have leases created against it, but noLeaseAcceptfor that provider can ever succeed. Consumer escrow is locked until the lease is cancelled. - Severity is low in practice: a node issuing its own certificate always fills a real expiry (
ExpiresAt = startMedian + CertificateValidity, 7 days), so triggering this requires a provider deliberately signing a malformed certificate for its own identity. The bug is a validation desync, not an attacker primitive — but it is a permanent denial of acceptance for the affected provider, and the inconsistency between the three sibling checks is exactly the kind of gap that hides worse desyncs.
Reproduction (in-process test)
store/zz_cert_expiry_test.go, TestZZCertExpiryZero (commit 89a542e):
- A zero-expiry certificate (hash
1485b43d55f3) passesVerifyCertificateContent. - A lease against it (
77e6449b9fae) is created successfully. - The accept for that lease fails with
lease_accept: certificate expired. - Control: the same blocks with
ExpiresAt = now + 7 dayspass the expiry check and fail later atlocked_r must be set, as expected — proving the expiry value is the only difference.
Test output (also attached as a screenshot):
zero-expiry cert passes VerifyCertificateContent (hash 1485b43d55f3)
lease created OK against zero-expiry cert (hash 77e6449b9fae)
accept correctly fails at expiry check: lease_accept: certificate expired
control accept passes expiry, fails later as expected: lease_accept missing locked emission params: locked_r must be set
Root cause (code)
core/ledger.go:1697(validateAndAddLeaseAccept):if startTime > certInfo.ExpiresAt— no!= 0guard.core/ledger.go:1543(lease side):if cert.ExpiresAt != 0 && b.Timestamp > cert.ExpiresAt— guard present.core/lease_renew.go:79(renew side):if cert.ExpiresAt != 0 && renewTime > cert.ExpiresAt— guard present.perf/certificate.go:156-197(VerifyCertificateContent): checks hash, signature, score, version, puzzles, cpu_hash, multiplier — no expiry check.node/perf.go:338-352(ingestCertificate): only callsVerifyCertificateContent, no expiry check.node/perf.go:104: a node issuing a certificate always sets a real expiry, which is why this needs a deliberately malformed self-signed certificate to trigger.
Relationship to known tickets
- XE-0001 §2 discusses the opposite direction (ExpiresAt = MaxInt64, a certificate that never expires, favoring the provider; its fix caps the expiry window from above) — not this finding.
- XE-4975 (work_proof / cpu_hash never recomputed, forged scores) is a different path.
- No match was found in the visible portion of the public board for
ExpiresAtorcertificate expired. The duplicate check is partial (about 300 of ~757 open tickets are visible), so I leave the duplicate decision to triage.
Suggested fix
Add the cert.ExpiresAt != 0 guard to the accept-side check in validateAndAddLeaseAccept, matching the lease and renew validators. Optionally, reject ExpiresAt == 0 at certificate issuance/ingest as well, so a zero-expiry certificate cannot enter the system at all.
Environment
- Commit: 89a542e ("release: testnet-0005 quorum withhold fix", 2026-11-10)
- Evidence is an in-process test on that commit; no public testnet nodes were involved.
- Attachments: screenshot of the passing test output.
Thread
Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-7915 and says what differs; it is read like any other.