Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Windows builds to use latest zlib #111239

Closed
SharpMan opened this issue Oct 24, 2023 · 10 comments
Closed

Update Windows builds to use latest zlib #111239

SharpMan opened this issue Oct 24, 2023 · 10 comments
Assignees
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes 3.13 new features, bugs and security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error type-security A security issue

Comments

@SharpMan
Copy link

SharpMan commented Oct 24, 2023

Bug report

Bug description:

A new version of zlib is out: 1.3 - https://zlib.net/

zlib 1.2.13 has CVE-2023-45853
https://www.openwall.com/lists/oss-security/2023/10/20/9

minizip is part of the contrib directory in zlib, but we do not appear to use this API. The CVSS v3 score is 9.8.

We would rather patch Python to use the latest library because people will ask us about that CVE.

CPython versions tested on:

3.11, 3.12, 3.13

Operating systems tested on:

Linux, Windows

Linked PRs

@SharpMan SharpMan added the type-bug An unexpected behavior, bug, or error label Oct 24, 2023
@AlexWaygood AlexWaygood added build The build process and cross-build type-security A security issue labels Oct 24, 2023
@zware
Copy link
Member

zware commented Oct 24, 2023

There is not a release with a fix for CVE-2023-45853 yet, and we aren't using the affected API anyway. We should probably update 3.13 to 1.3.1 when it becomes available, and probably update 3.11-3.12 to 1.2.14 if it appears. But until there's a release, there's nothing for us to do here. As such, I'm going to go ahead and close the current PR but leave this issue open.

Thanks for bringing this to our attention!

@zware
Copy link
Member

zware commented Oct 24, 2023

I'm going to mark this as a 'deferred-blocker': we don't want to forget about it before final releases, but it's also not a release blocker.

@zware zware added 3.11 only security fixes deferred-blocker 3.12 bugs and security fixes 3.13 new features, bugs and security fixes labels Oct 24, 2023
@zware zware changed the title Update binary builds to use zlib 1.3 Update Windows builds to use latest zlib Oct 24, 2023
@zware zware self-assigned this Oct 24, 2023
zware added a commit to python/cpython-source-deps that referenced this issue Feb 1, 2024
zware added a commit to zware/cpython that referenced this issue Feb 1, 2024
@zware
Copy link
Member

zware commented Feb 2, 2024

@python/release-managers-in-development-maintenance-and-security-mode: main is now updated to use 1.3.1. Given the following:

  • We were never vulnerable to the CVE that started this issue
  • The CVE-2023-45853 link on GitHub now shows the vulnerability to be against the pyminizip package on PyPI rather than zlib itself, so there's arguably not even a link back to CPython from it anymore anyway
  • There doesn't appear to be a zlib 1.2.14 expected
  • It's not clear how SemVer-y zlib is anyway

How far do we want to backport the update? I can see arguments for backporting to 3.8-3.12, 3.11-3.12, or not at all, so I'll leave it up to you all to set the backport labels you want on #114877 or close this issue :)

@zware
Copy link
Member

zware commented Feb 3, 2024

Upgrading to release-blocker for <=3.12.

@zware zware added release-blocker 3.10 only security fixes 3.9 only security fixes 3.8 only security fixes and removed deferred-blocker 3.13 new features, bugs and security fixes labels Feb 3, 2024
@Yhg1s
Copy link
Member

Yhg1s commented Feb 6, 2024

Has this been backported to 3.12 yet? (3.12.2 is scheduled for today.)

@Yhg1s
Copy link
Member

Yhg1s commented Feb 6, 2024

@ned-deily pointed out there wasn't a clear decision on what to backport to. (I thought #111239 (comment) meant it was decided.) I think a backport to 3.12 is warranted; 3.11 and earlier is up to @pablogsal and @ambv.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 6, 2024
)

(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
@zooba
Copy link
Member

zooba commented Feb 6, 2024

Since there's a CVE attached, I vote for backporting all the way. Even if it doesn't affect us, users regularly fail to recognise that, and we'll get called out for not shipping security fixes in our security releases (all builds on Windows will default to the version we have in the repo - overriding is possible, but it's not automatic).

Plus if another actual security issue comes up that does require full backports, we'll potentially have had some experience with any other changes by then (i.e. less of a version jump).


I created all the backport PRs, but have not set any to merge. Let's at least get the PR validation before deciding.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 6, 2024
)

(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 6, 2024
)

(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
@ambv
Copy link
Contributor

ambv commented Feb 6, 2024

I agree with Steve.

ambv pushed a commit that referenced this issue Feb 6, 2024
…115079)

gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877)
(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
ambv pushed a commit to ambv/cpython that referenced this issue Feb 6, 2024
…GH-114877)

(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
ambv pushed a commit to ambv/cpython that referenced this issue Feb 6, 2024
…GH-114877)

(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
ambv pushed a commit that referenced this issue Feb 6, 2024
…H-115076)

gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877)
(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
ambv pushed a commit that referenced this issue Feb 6, 2024
…H-115080)

gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877)
(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
ambv added a commit that referenced this issue Feb 6, 2024
…H-115087)

(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
ambv added a commit that referenced this issue Feb 6, 2024
…115086)

(cherry picked from commit 618d725)

Co-authored-by: Zachary Ware <zach@python.org>
@ambv
Copy link
Contributor

ambv commented Feb 6, 2024

3.8 - 3.13 updated. This can be closed.

@ambv ambv closed this as completed Feb 6, 2024
@zware zware added 3.13 new features, bugs and security fixes and removed release-blocker labels Feb 6, 2024
@zware
Copy link
Member

zware commented Feb 6, 2024

I thought #111239 (comment) meant it was decided.

Sorry for the confusion, was just trying to raise visibility before impending releases.

aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes 3.13 new features, bugs and security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error type-security A security issue
Projects
Development

No branches or pull requests

6 participants