Skip to content

Kuba/public key/minor hardening/otp 20197#11239

Open
u3s wants to merge 2 commits into
erlang:maintfrom
u3s:kuba/public_key/minor_hardening/OTP-20197
Open

Kuba/public key/minor hardening/otp 20197#11239
u3s wants to merge 2 commits into
erlang:maintfrom
u3s:kuba/public_key/minor_hardening/OTP-20197

Conversation

@u3s

@u3s u3s commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@u3s u3s self-assigned this Jun 15, 2026
@u3s u3s added the team:PS Assigned to OTP team PS label Jun 15, 2026
@u3s u3s requested a review from IngelaAndin June 15, 2026 14:39
@u3s u3s added the testing currently being tested, tag is used by OTP internal CI label Jun 15, 2026
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

  2 files   18 suites   4m 45s ⏱️
313 tests 305 ✅ 8 💤 0 ❌
330 runs  322 ✅ 8 💤 0 ❌

Results for commit ff1cb70.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@u3s u3s force-pushed the kuba/public_key/minor_hardening/OTP-20197 branch from 8d31998 to 768a606 Compare June 18, 2026 11:10
u3s added 2 commits June 19, 2026 10:45
Replace == with crypto:hash_equals/2 for issuerNameHash,
issuerKeyHash, and byKey responder ID comparisons in
pubkey_ocsp.erl. The == operator short-circuits on the first
differing byte, creating a timing side-channel.

Affected locations:
- match_single_response/4: issuerNameHash and issuerKeyHash
- is_responder_cert/2: byKey SHA-1 hash
Add a 100 KB size guard in decode_response/1 to reject
oversized input before calling der_decode. This prevents
unbounded memory allocation from crafted OCSP responses.

The 100 KB limit is aligned with OpenSSL's
OSSL_HTTP_DEFAULT_MAX_RESP_LEN. Typical OCSP responses are
1–5 KB; multi-stapling with 10 certs reaches ~50 KB.

Oversized input returns:
{error, {ocsp_response_too_large, Size}}
@u3s u3s force-pushed the kuba/public_key/minor_hardening/OTP-20197 branch from 768a606 to ff1cb70 Compare June 19, 2026 08:45
@u3s u3s added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant