Bug 2247821 - CVE-2023-44271 python-pillow: uncontrolled resource consumption when textlength in an ImageDraw instance operates on a long text argument [fedora-all]
Summary: CVE-2023-44271 python-pillow: uncontrolled resource consumption when textleng...
Keywords:
Status: ON_QA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pillow
Version: 38
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: CVE-2023-44271
TreeView+ depends on / blocked
 
Reported: 2023-11-03 16:43 UTC by Guilherme de Almeida Suckevicz
Modified: 2024-01-29 08:20 UTC (History)
5 users (show)

Fixed In Version: python-pillow-9.5.0-1.fc38
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-12 01:42:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2023-11-03 16:43:49 UTC
More information about this security flaw is available in the following bug:

http://bugzilla.redhat.com/show_bug.cgi?id=2247820

Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

Comment 1 Guilherme de Almeida Suckevicz 2023-11-03 16:43:52 UTC
Use the following template to for the 'fedpkg update' request to submit an
update for this issue as it contains the top-level parent bug(s) as well as
this tracking bug.  This will ensure that all associated bugs get updated
when new packages are pushed to stable.

=====

# bugfix, security, enhancement, newpackage (required)
type=security

# low, medium, high, urgent (required)
severity=medium

# testing, stable
request=testing

# Bug numbers: 1234,9876
bugs=2247820,2247821

# Description of your update
notes=Security fix for [PUT CVEs HERE]

# Enable request automation based on the stable/unstable karma thresholds
autokarma=True
stable_karma=3
unstable_karma=-3

# Automatically close bugs when this marked as stable
close_bugs=True

# Suggest that users restart after update
suggest_reboot=False

======

Additionally, you may opt to use the bodhi web interface to submit updates:

https://bodhi.fedoraproject.org/updates/new

Comment 2 Fedora Update System 2023-11-03 17:32:21 UTC
FEDORA-2023-1a120657f9 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-1a120657f9

Comment 3 Fedora Update System 2023-11-04 03:45:36 UTC
FEDORA-2023-1a120657f9 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-1a120657f9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-1a120657f9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2023-11-12 01:42:51 UTC
FEDORA-2023-1a120657f9 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Lumír Balhar 2023-11-12 11:03:58 UTC
I'm reopening this bug for the reason provided in the Bodhi update:

Unfortunately, the patch backported from upstream from version 10 to fix the CVE-2023-44271 is not enough for version 9.5 we have in Fedora 38. The problem is that classes in ImageFont module have also `getsize` method which is deprecated in version 9 and removed in version 10 which means that the fix in version 10 is not applied to these methods and they stay vulnerable in this update.

Comment 6 Fedora Update System 2023-11-21 18:18:50 UTC
FEDORA-2023-13b03a90f9 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-13b03a90f9

Comment 7 Fedora Update System 2023-11-22 03:04:29 UTC
FEDORA-2023-13b03a90f9 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-13b03a90f9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-13b03a90f9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-01-28 02:53:50 UTC
FEDORA-2024-4ef97ebbfc has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-4ef97ebbfc`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-4ef97ebbfc

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Lumír Balhar 2024-01-29 08:20:59 UTC
As I mentioned earlier, the patch in version 9 is not enough to fix the vulnerability. I'm willing to help fix it.

The patch uses a function which is not backported as a part of the patch:

File "/usr/lib64/python3.11/site-packages/PIL/ImageFont.py", line 483, in getsize
    _string_length_check(text)
    ^^^^^^^^^^^^^^^^^^^^
NameError: name '_string_length_check' is not defined


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