Skip to content

Commit 51e8a84

Browse files
committed
Fix documentation of X509_VERIFY_PARAM_add0_policy()
The function was incorrectly documented as enabling policy checking. Fixes: CVE-2023-0466 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from #20563)
1 parent 9a1410b commit 51e8a84

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ breaking changes, and mappings for the large list of deprecated functions.
3030

3131
### Changes between 3.0.8 and 3.0.9 [xx XXX xxxx]
3232

33+
* Corrected documentation of X509_VERIFY_PARAM_add0_policy() to mention
34+
that it does not enable policy checking. Thanks to David Benjamin for
35+
discovering this issue.
36+
([CVE-2023-0466])
37+
38+
*Tomáš Mráz*
39+
3340
* Fixed an issue where invalid certificate policies in leaf certificates are
3441
silently ignored by OpenSSL and other certificate policy checks are skipped
3542
for that certificate. A malicious CA could use this to deliberately assert
@@ -19599,6 +19606,7 @@ ndif
1959919606

1960019607
<!-- Links -->
1960119608

19609+
[CVE-2023-0466]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0466
1960219610
[CVE-2023-0465]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0465
1960319611
[CVE-2023-0464]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0464
1960419612
[CVE-2023-0401]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0401

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ OpenSSL 3.0
2020

2121
### Major changes between OpenSSL 3.0.8 and OpenSSL 3.0.9 [under development]
2222

23+
* Fixed documentation of X509_VERIFY_PARAM_add0_policy() ([CVE-2023-0466])
2324
* Fixed handling of invalid certificate policies in leaf certificates
2425
([CVE-2023-0465])
2526
* Limited the number of nodes created in a policy tree ([CVE-2023-0464])
@@ -1436,6 +1437,7 @@ OpenSSL 0.9.x
14361437
* Support for various new platforms
14371438

14381439
<!-- Links -->
1440+
[CVE-2023-0466]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0466
14391441
[CVE-2023-0465]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0465
14401442
[CVE-2023-0464]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0464
14411443
[CVE-2023-0401]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-0401

doc/man3/X509_VERIFY_PARAM_set_flags.pod

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ B<trust>.
9898
X509_VERIFY_PARAM_set_time() sets the verification time in B<param> to
9999
B<t>. Normally the current time is used.
100100

101-
X509_VERIFY_PARAM_add0_policy() enables policy checking (it is disabled
102-
by default) and adds B<policy> to the acceptable policy set.
101+
X509_VERIFY_PARAM_add0_policy() adds B<policy> to the acceptable policy set.
102+
Contrary to preexisting documentation of this function it does not enable
103+
policy checking.
103104

104105
X509_VERIFY_PARAM_set1_policies() enables policy checking (it is disabled
105106
by default) and sets the acceptable policy set to B<policies>. Any existing
@@ -400,6 +401,10 @@ The X509_VERIFY_PARAM_get_hostflags() function was added in OpenSSL 1.1.0i.
400401
The X509_VERIFY_PARAM_get0_host(), X509_VERIFY_PARAM_get0_email(),
401402
and X509_VERIFY_PARAM_get1_ip_asc() functions were added in OpenSSL 3.0.
402403

404+
The function X509_VERIFY_PARAM_add0_policy() was historically documented as
405+
enabling policy checking however the implementation has never done this.
406+
The documentation was changed to align with the implementation.
407+
403408
=head1 COPYRIGHT
404409

405410
Copyright 2009-2023 The OpenSSL Project Authors. All Rights Reserved.

0 commit comments

Comments
 (0)