Bug 2171817 (CVE-2023-23931) - CVE-2023-23931 python-cryptography: memory corruption via immutable objects
Summary: CVE-2023-23931 python-cryptography: memory corruption via immutable objects
Keywords:
Status: NEW
Alias: CVE-2023-23931
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2171823 2173566 2173646 2173647 2171820 2171821 2171822 2171826 2171831 2172399 2172404 2173564 2173565 2173568 2173569 2173643 2173644 2173645 2173648 2173649 2173650 2173651 2173652 2173653 2173654 2173655 2173656 2173657 2173658 2173659 2173660 2173661 2173662 2173663 2173664 2175090 2175091 2175092 2175093 2175094
Blocks: 2168033
TreeView+ depends on / blocked
 
Reported: 2023-02-20 14:01 UTC by ybuenos
Modified: 2023-11-30 14:35 UTC (History)
60 users (show)

Fixed In Version: python-cryptography 39.0.1, cryptography 39.0.1
Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in python-cryptography. In affected versions, `Cipher.update_into` would accept Python objects which implement the buffer protocol but provide only immutable buffers. This issue allows immutable objects (such as `bytes`) to be mutated, thus violating the fundamental rules of Python, resulting in corrupted output.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pyca cryptography pull 8230 0 None Merged Don't allow update_into to mutate immutable objects 2023-02-22 07:44:59 UTC
Red Hat Product Errata RHBA-2023:6800 0 None None None 2023-11-08 09:36:11 UTC
Red Hat Product Errata RHSA-2023:4693 0 None None None 2023-08-21 21:49:41 UTC
Red Hat Product Errata RHSA-2023:4971 0 None None None 2023-09-05 11:50:50 UTC
Red Hat Product Errata RHSA-2023:6615 0 None None None 2023-11-07 08:22:02 UTC
Red Hat Product Errata RHSA-2023:6793 0 None None None 2023-11-08 08:17:16 UTC
Red Hat Product Errata RHSA-2023:7096 0 None None None 2023-11-14 15:21:45 UTC
Red Hat Product Errata RHSA-2023:7341 0 None None None 2023-11-30 14:35:06 UTC

Description ybuenos 2023-02-20 14:01:54 UTC
cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. In affected versions `Cipher.update_into` would accept Python objects which implement the buffer protocol, but provide only immutable buffers. This would allow immutable objects (such as `bytes`) to be mutated, thus violating fundamental rules of Python and resulting in corrupted output. This now correctly raises an exception. This issue has been present since `update_into` was originally introduced in cryptography 1.8.

Comment 1 ybuenos 2023-02-20 14:06:31 UTC
Created python-cryptography tracking bugs for this issue:

Affects: fedora-36 [bug 2171820]

Comment 3 ybuenos 2023-02-20 14:10:55 UTC
Created python-cryptography tracking bugs for this issue:

Affects: fedora-37 [bug 2171826]

Comment 6 Tomas Orsava 2023-02-22 14:37:39 UTC
Hi ybuenos,
we're currently adding python3.11-cryptography to [RHEL 8.8] and [RHEL 9.2]. Could you please create a CVE bug for these components so we can fix them before we release the packages?

[RHEL 8.8] https://issues.redhat.com/browse/RHELPLAN-143585
[RHEl 9.2] https://issues.redhat.com/browse/RHELPLAN-143619

Thank you!

Comment 7 Christian Heimes 2023-02-22 14:46:17 UTC
FYI, RHEL 8.8 builds are blocked until rhbz#2172416 is resolved.

Comment 10 ybuenos 2023-02-27 09:27:14 UTC
Created python-cryptography tracking bugs for this issue:

Affects: openstack-rdo [bug 2173564]


Created python-docker tracking bugs for this issue:

Affects: openstack-rdo [bug 2173565]


Created python3-cryptography tracking bugs for this issue:

Affects: epel-7 [bug 2173566]

Comment 12 ybuenos 2023-02-27 15:22:24 UTC
Created ansible-lint tracking bugs for this issue:

Affects: fedora-all [bug 2173649]


Created centpkg tracking bugs for this issue:

Affects: epel-all [bug 2173643]
Affects: fedora-all [bug 2173650]


Created cura tracking bugs for this issue:

Affects: fedora-all [bug 2173651]


Created limnoria tracking bugs for this issue:

Affects: fedora-all [bug 2173652]


Created pypy tracking bugs for this issue:

Affects: fedora-all [bug 2173653]


Created pypy3.7 tracking bugs for this issue:

Affects: fedora-all [bug 2173654]


Created pypy3.8 tracking bugs for this issue:

Affects: fedora-all [bug 2173655]


Created pypy3.9 tracking bugs for this issue:

Affects: fedora-all [bug 2173656]


Created python-cryptography tracking bugs for this issue:

Affects: fedora-all [bug 2173657]


Created python-cryptography-vectors tracking bugs for this issue:

Affects: epel-all [bug 2173644]


Created python-docker tracking bugs for this issue:

Affects: epel-all [bug 2173645]
Affects: fedora-all [bug 2173658]


Created python-molecule tracking bugs for this issue:

Affects: fedora-all [bug 2173659]


Created python-play-scraper tracking bugs for this issue:

Affects: fedora-all [bug 2173660]


Created python-rpi-gpio2 tracking bugs for this issue:

Affects: fedora-all [bug 2173661]


Created python-stem tracking bugs for this issue:

Affects: fedora-all [bug 2173662]


Created python-types-cryptography tracking bugs for this issue:

Affects: fedora-all [bug 2173663]


Created python-uvicorn tracking bugs for this issue:

Affects: fedora-all [bug 2173664]


Created python3-cryptography tracking bugs for this issue:

Affects: epel-all [bug 2173646]


Created python3-cryptography-vectors tracking bugs for this issue:

Affects: epel-all [bug 2173647]


Created python3-docker tracking bugs for this issue:

Affects: epel-all [bug 2173648]

Comment 19 errata-xmlrpc 2023-08-21 21:49:39 UTC
This issue has been addressed in the following products:

  Red Hat Ansible Automation Platform 2.4 for RHEL 8
  Red Hat Ansible Automation Platform 2.4 for RHEL 9

Via RHSA-2023:4693 https://access.redhat.com/errata/RHSA-2023:4693

Comment 20 errata-xmlrpc 2023-09-05 11:50:46 UTC
This issue has been addressed in the following products:

  Red Hat Ansible Automation Platform 2.4 for RHEL 9
  Red Hat Ansible Automation Platform 2.4 for RHEL 8

Via RHSA-2023:4971 https://access.redhat.com/errata/RHSA-2023:4971

Comment 21 errata-xmlrpc 2023-11-07 08:21:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:6615 https://access.redhat.com/errata/RHSA-2023:6615

Comment 22 errata-xmlrpc 2023-11-08 08:17:12 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7

Via RHSA-2023:6793 https://access.redhat.com/errata/RHSA-2023:6793

Comment 23 errata-xmlrpc 2023-11-14 15:21:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:7096 https://access.redhat.com/errata/RHSA-2023:7096

Comment 24 errata-xmlrpc 2023-11-30 14:35:02 UTC
This issue has been addressed in the following products:

  Red Hat Quay 3

Via RHSA-2023:7341 https://access.redhat.com/errata/RHSA-2023:7341


Note You need to log in before you can comment on or make changes to this bug.