mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
41.0.6 release (#9927)
* Fixed crash when loading a PKCS#7 bundle with no certificates (#9926) * Version bump for 41.0.6 * Temporarily allow a new clippy warning (#9835) * Temporarily allow a new clippy warning * Update lib.rs * Update lib.rs * Need to accept this to skip test * It's a word
This commit is contained in:
parent
5012bedaef
commit
f09c261ca1
9 changed files with 26 additions and 5 deletions
|
|
@ -1,6 +1,15 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
.. _v41-0-6:
|
||||
|
||||
41.0.6 - 2023-11-27
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Fixed a null-pointer-dereference and segfault that could occur when loading
|
||||
certificates from a PKCS#7 bundle. Credit to **pkuzco** for reporting the
|
||||
issue. **CVE-2023-49083**
|
||||
|
||||
.. _v41-0-5:
|
||||
|
||||
41.0.5 - 2023-10-24
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ decrypted
|
|||
decrypting
|
||||
deprecations
|
||||
DER
|
||||
dereference
|
||||
deserialize
|
||||
deserialized
|
||||
Deserialization
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[project]
|
||||
name = "cryptography"
|
||||
version = "41.0.5"
|
||||
version = "41.0.6"
|
||||
authors = [
|
||||
{name = "The Python Cryptographic Authority and individual contributors", email = "cryptography-dev@python.org"}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ __all__ = [
|
|||
"__copyright__",
|
||||
]
|
||||
|
||||
__version__ = "41.0.5"
|
||||
__version__ = "41.0.6"
|
||||
|
||||
|
||||
__author__ = "The Python Cryptographic Authority and individual contributors"
|
||||
|
|
|
|||
|
|
@ -1890,9 +1890,12 @@ class Backend:
|
|||
_Reasons.UNSUPPORTED_SERIALIZATION,
|
||||
)
|
||||
|
||||
certs: list[x509.Certificate] = []
|
||||
if p7.d.sign == self._ffi.NULL:
|
||||
return certs
|
||||
|
||||
sk_x509 = p7.d.sign.cert
|
||||
num = self._lib.sk_X509_num(sk_x509)
|
||||
certs = []
|
||||
for i in range(num):
|
||||
x509 = self._lib.sk_X509_value(sk_x509, i)
|
||||
self.openssl_assert(x509 != self._ffi.NULL)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
// for complete details.
|
||||
|
||||
#![deny(rust_2018_idioms)]
|
||||
// Work-around for https://github.com/PyO3/pyo3/issues/3561
|
||||
#![allow(unknown_lints, clippy::unnecessary_fallible_conversions)]
|
||||
|
||||
mod asn1;
|
||||
mod backend;
|
||||
|
|
|
|||
|
|
@ -89,6 +89,12 @@ class TestPKCS7Loading:
|
|||
mode="rb",
|
||||
)
|
||||
|
||||
def test_load_pkcs7_empty_certificates(self, backend):
|
||||
der = b"\x30\x0B\x06\x09\x2A\x86\x48\x86\xF7\x0D\x01\x07\x02"
|
||||
|
||||
certificates = pkcs7.load_der_pkcs7_certificates(der)
|
||||
assert certificates == []
|
||||
|
||||
|
||||
# We have no public verification API and won't be adding one until we get
|
||||
# some requirements from users so this function exists to give us basic
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ __all__ = [
|
|||
"__version__",
|
||||
]
|
||||
|
||||
__version__ = "41.0.5"
|
||||
__version__ = "41.0.6"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[project]
|
||||
name = "cryptography_vectors"
|
||||
version = "41.0.5"
|
||||
version = "41.0.6"
|
||||
authors = [
|
||||
{name = "The Python Cryptographic Authority and individual contributors", email = "cryptography-dev@python.org"}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue