Skip to content

Reject delta CRLs as complete CRLs to avoid accepting previously revoked certs - #31044

Closed
idrassi wants to merge 1 commit into
openssl:masterfrom
amcrypto-jp:issue-31040-delta-crl
Closed

idrassi wants to merge 1 commit into
openssl:masterfrom
amcrypto-jp:issue-31040-delta-crl

Conversation

@idrassi

@idrassi idrassi commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

get_crl_score could skip delta CRL rejection when the CRL had IDP reason flags, or when extended CRL support was disabled. This allowed a CRL with a Delta CRL Indicator to be scored as a complete/base CRL candidate.

If a verifier is presented only with a delta CRL and it is incorrectly accepted as a complete CRL, revocations present in the base/complete CRL but absent from the delta CRL can be silently ignored. This could cause a previously revoked certificate to be accepted as valid.

Move the base_crl_number check before the extended CRL and IDP reason handling so delta CRLs are rejected unconditionally at this selection stage. Delta CRLs remain processed through the normal delta path after a complete CRL is selected and compatibility is checked.

Add verify recipe coverage for:

  • a delta CRL being rejected as a complete CRL
  • a delta CRL with IssuingDistributionPoint.onlySomeReasons being rejected under -extended_crl

Tests run (Linux Ubuntu 24.04):

./Configure no-docs && make -j8
make test TESTS=test_verify

Fixes #31040

Checklist
  • tests are added or updated

get_crl_score() is used when selecting a complete/base CRL. Its delta CRL rejection was chained after the extended CRL and IDP reason handling, so it could be skipped when extended CRL support was disabled, or when an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as a complete/base CRL candidate. Since a delta CRL contains only changes relative to a base CRL, this could cause a previously revoked certificate to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before IDP reason filtering. Delta CRLs are still considered by get_delta_sk() after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL, and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue openssl#31040)

Fixes openssl#31040
@idrassi
idrassi force-pushed the issue-31040-delta-crl branch from 6b26493 to 906b4d7 Compare May 14, 2026 03:12
@openssl-machine openssl-machine added the approval: review pending This pull request needs review by a committer label May 14, 2026
@openssl-machine

Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

@t8m t8m added triaged: bug The issue/pr is/fixes a bug tests: present The PR has suitable tests present labels Jun 15, 2026
@t8m t8m added branch: master Applies to master branch branch: 3.0 Applies to openssl-3.0 branch (EOL) branch: 3.4 Applies to openssl-3.4 branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 branch: 4.0 Applies to openssl-4.0 labels Jun 15, 2026
@t8m t8m closed this Jun 15, 2026
@t8m t8m reopened this Jun 15, 2026
@t8m
t8m requested review from a team, bob-beck, mattcaswell, n13l and vdukhovni June 15, 2026 12:08
@openssl-machine openssl-machine added approval: done This pull request has the required number of approvals approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: review pending This pull request needs review by a committer approval: done This pull request has the required number of approvals labels Jun 15, 2026
@openssl-machine

Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

openssl-machine added a commit that referenced this pull request Jun 17, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL rejection was chained after the extended CRL and IDP reason handling, so it could be skipped when extended CRL support was disabled, or when an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as a complete/base CRL candidate. Since a delta CRL contains only changes relative to a base CRL, this could cause a previously revoked certificate to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before IDP reason filtering. Delta CRLs are still considered by get_delta_sk() after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL, and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue #31040)

Fixes #31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from #31044)
@t8m

t8m commented Jun 17, 2026

Copy link
Copy Markdown
Member

@idrassi Why have you used openssl-machine as the author for the commit?? Unfortunately I've noticed this only when cherry-picking so on the master branch we have this with an incorrect author.

openssl-machine pushed a commit that referenced this pull request Jun 17, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL
rejection was chained after the extended CRL and IDP reason handling,
so it could be skipped when extended CRL support was disabled, or when
an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as
a complete/base CRL candidate. Since a delta CRL contains only changes
relative to a base CRL, this could cause a previously revoked certificate
to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before
IDP reason filtering. Delta CRLs are still considered by get_delta_sk()
after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL,
and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being
rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue #31040)

Fixes #31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from #31044)

(cherry picked from commit 5a3723e)
@idrassi

idrassi commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@t8m I remember that I prepared this PR from a temporary cloud Linux VM while on the move, not from my usual setup. Clearly, the local git config was bad before pushing and I didn't notice.
Sorry for the trouble this caused, especially during cherry-picking. I’ll make sure to check the commit author explicitly when working from temporary environments.

openssl-machine pushed a commit that referenced this pull request Jun 17, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL
rejection was chained after the extended CRL and IDP reason handling,
so it could be skipped when extended CRL support was disabled, or when
an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as
a complete/base CRL candidate. Since a delta CRL contains only changes
relative to a base CRL, this could cause a previously revoked certificate
to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before
IDP reason filtering. Delta CRLs are still considered by get_delta_sk()
after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL,
and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being
rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue #31040)

Fixes #31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from #31044)

(cherry picked from commit 5a3723e)
openssl-machine pushed a commit that referenced this pull request Jun 17, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL
rejection was chained after the extended CRL and IDP reason handling,
so it could be skipped when extended CRL support was disabled, or when
an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as
a complete/base CRL candidate. Since a delta CRL contains only changes
relative to a base CRL, this could cause a previously revoked certificate
to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before
IDP reason filtering. Delta CRLs are still considered by get_delta_sk()
after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL,
and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being
rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue #31040)

Fixes #31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from #31044)

(cherry picked from commit 5a3723e)
openssl-machine pushed a commit that referenced this pull request Jun 17, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL
rejection was chained after the extended CRL and IDP reason handling,
so it could be skipped when extended CRL support was disabled, or when
an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as
a complete/base CRL candidate. Since a delta CRL contains only changes
relative to a base CRL, this could cause a previously revoked certificate
to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before
IDP reason filtering. Delta CRLs are still considered by get_delta_sk()
after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL,
and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being
rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue #31040)

Fixes #31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from #31044)

(cherry picked from commit 5a3723e)
(cherry picked from commit c26731f)
@t8m

t8m commented Jun 17, 2026

Copy link
Copy Markdown
Member

Merged to all the active branches. Thank you for your contribution.

@t8m t8m closed this Jun 17, 2026
openssl-machine pushed a commit that referenced this pull request Jun 17, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL
rejection was chained after the extended CRL and IDP reason handling,
so it could be skipped when extended CRL support was disabled, or when
an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as
a complete/base CRL candidate. Since a delta CRL contains only changes
relative to a base CRL, this could cause a previously revoked certificate
to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before
IDP reason filtering. Delta CRLs are still considered by get_delta_sk()
after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL,
and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being
rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue #31040)

Fixes #31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from #31044)

(cherry picked from commit 5a3723e)
n13l pushed a commit to n13l/openssl that referenced this pull request Jul 25, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL rejection was chained after the extended CRL and IDP reason handling, so it could be skipped when extended CRL support was disabled, or when an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as a complete/base CRL candidate. Since a delta CRL contains only changes relative to a base CRL, this could cause a previously revoked certificate to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before IDP reason filtering. Delta CRLs are still considered by get_delta_sk() after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL, and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue openssl#31040)

Fixes openssl#31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from openssl#31044)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Aug 20, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL
rejection was chained after the extended CRL and IDP reason handling,
so it could be skipped when extended CRL support was disabled, or when
an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as
a complete/base CRL candidate. Since a delta CRL contains only changes
relative to a base CRL, this could cause a previously revoked certificate
to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before
IDP reason filtering. Delta CRLs are still considered by get_delta_sk()
after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL,
and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being
rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue openssl#31040)

Fixes openssl#31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from openssl#31044)

(cherry picked from commit 5a3723e)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Aug 20, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL
rejection was chained after the extended CRL and IDP reason handling,
so it could be skipped when extended CRL support was disabled, or when
an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as
a complete/base CRL candidate. Since a delta CRL contains only changes
relative to a base CRL, this could cause a previously revoked certificate
to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before
IDP reason filtering. Delta CRLs are still considered by get_delta_sk()
after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL,
and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being
rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue openssl#31040)

Fixes openssl#31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from openssl#31044)

(cherry picked from commit 5a3723e)
bernd-edlinger pushed a commit to bernd-edlinger/openssl that referenced this pull request Aug 20, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL
rejection was chained after the extended CRL and IDP reason handling,
so it could be skipped when extended CRL support was disabled, or when
an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as
a complete/base CRL candidate. Since a delta CRL contains only changes
relative to a base CRL, this could cause a previously revoked certificate
to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before
IDP reason filtering. Delta CRLs are still considered by get_delta_sk()
after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL,
and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being
rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue openssl#31040)

Fixes openssl#31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from openssl#31044)

(cherry picked from commit 5a3723e)
rickyringler pushed a commit to rickyringler/openssl that referenced this pull request Aug 21, 2026
get_crl_score() is used when selecting a complete/base CRL. Its delta CRL rejection was chained after the extended CRL and IDP reason handling, so it could be skipped when extended CRL support was disabled, or when an IDP onlySomeReasons branch was taken.

As a result, a CRL with a Delta CRL Indicator could be scored as a complete/base CRL candidate. Since a delta CRL contains only changes relative to a base CRL, this could cause a previously revoked certificate to be accepted as valid when only the delta CRL is presented to the verifier.

Reject CRLs with base_crl_number unconditionally in get_crl_score() before IDP reason filtering. Delta CRLs are still considered by get_delta_sk() after a complete CRL is selected and check_delta_base() confirms compatibility.

Add verify recipe coverage for a delta CRL being rejected as a complete CRL, and for a delta CRL with IssuingDistributionPoint.onlySomeReasons being rejected under -extended_crl.

Reported-by: jujerpig (GitHub issue openssl#31040)

Fixes openssl#31040

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Wed Jun 17 08:53:02 2026
(Merged from openssl#31044)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch branch: 3.0 Applies to openssl-3.0 branch (EOL) branch: 3.4 Applies to openssl-3.4 branch: 3.5 Applies to openssl-3.5 branch: 3.6 Applies to openssl-3.6 branch: 4.0 Applies to openssl-4.0 tests: present The PR has suitable tests present triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delta CRL may be incorrectly treated as base CRL in get_crl_score() when IDP onlySomeReasons is present

4 participants