Skip to content

Commit

Permalink
x509: fix double locking problem
Browse files Browse the repository at this point in the history
This reverts commit 9aa4be6 and removed the
redundant flag setting.

Fixes #19643

Fixes LOW CVE-2022-3996

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #19652)

(cherry picked from commit 4d0340a)
  • Loading branch information
paulidale authored and t8m committed Dec 8, 2022
1 parent 9a5c884 commit 7725e7b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions crypto/x509/pcy_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ int ossl_policy_cache_set_mapping(X509 *x, POLICY_MAPPINGS *maps)

ret = 1;
bad_mapping:
if (ret == -1 && CRYPTO_THREAD_write_lock(x->lock)) {
x->ex_flags |= EXFLAG_INVALID_POLICY;
CRYPTO_THREAD_unlock(x->lock);
}
sk_POLICY_MAPPING_pop_free(maps, POLICY_MAPPING_free);
return ret;

Expand Down

0 comments on commit 7725e7b

Please sign in to comment.