Skip to content

Commit

Permalink
pythongh-101726: Update the OpenSSL version to 1.1.1t (pythonGH-101727)
Browse files Browse the repository at this point in the history
Fixes CVE-2023-0286 (High) and a couple of Medium security issues.
https://www.openssl.org/news/secadv/20230207.txt
  • Loading branch information
gpshead authored and zooba committed Feb 9, 2023
1 parent c7fdc9c commit e5bc753
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
variables:
testRunTitle: '$(build.sourceBranchName)-linux'
testRunPlatform: linux
openssl_version: 1.1.1n
openssl_version: 1.1.1t

steps:
- template: ./posix-steps.yml
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.1n
openssl_version: 1.1.1t

steps:
- template: ./posix-steps.yml
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
variables:
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
testRunPlatform: linux
openssl_version: 1.1.1n
openssl_version: 1.1.1t

steps:
- template: ./posix-steps.yml
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.1n
openssl_version: 1.1.1t

steps:
- template: ./posix-steps.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
env:
OPENSSL_VER: 1.1.1n
OPENSSL_VER: 1.1.1t
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
Expand Down
6 changes: 3 additions & 3 deletions Mac/BuildScript/build-installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ def library_recipes():

result.extend([
dict(
name="OpenSSL 1.1.1n",
url="https://www.openssl.org/source/openssl-1.1.1n.tar.gz",
checksum='2aad5635f9bb338bc2c6b7d19cbc9676',
name="OpenSSL 1.1.1t",
url="https://www.openssl.org/source/openssl-1.1.1t.tar.gz",
checksum='8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b',
buildrecipe=build_universal_openssl,
configure=None,
install=None,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Updated the OpenSSL version used in Windows and macOS binary release builds
to 1.1.1t to address CVE-2023-0286, CVE-2022-4303, and CVE-2022-4303 per
`the OpenSSL 2023-02-07 security advisory
<https://www.openssl.org/news/secadv/20230207.txt>`_.
4 changes: 2 additions & 2 deletions PCbuild/get_externals.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ echo.Fetching external libraries...

set libraries=
set libraries=%libraries% bzip2-1.0.8
if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1s
if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1t
set libraries=%libraries% sqlite-3.31.1.0
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.9.0
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.9.0
Expand All @@ -72,7 +72,7 @@ for %%e in (%libraries%) do (
echo.Fetching external binaries...

set binaries=
if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1s
if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1t
if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.9.0
if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06

Expand Down
25 changes: 16 additions & 9 deletions PCbuild/python.props
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,22 @@
<ExternalsDir>$(EXTERNALS_DIR)</ExternalsDir>
<ExternalsDir Condition="$(ExternalsDir) == ''">$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`))</ExternalsDir>
<ExternalsDir Condition="!HasTrailingSlash($(ExternalsDir))">$(ExternalsDir)\</ExternalsDir>
<sqlite3Dir>$(ExternalsDir)sqlite-3.31.1.0\</sqlite3Dir>
<bz2Dir>$(ExternalsDir)bzip2-1.0.8\</bz2Dir>
<lzmaDir>$(ExternalsDir)xz-5.2.2\</lzmaDir>
<opensslDir>$(ExternalsDir)openssl-1.1.1s\</opensslDir>
<opensslOutDir>$(ExternalsDir)openssl-bin-1.1.1s\$(ArchName)\</opensslOutDir>
<opensslIncludeDir>$(opensslOutDir)include</opensslIncludeDir>
<nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir>
<zlibDir>$(ExternalsDir)\zlib-1.2.12\</zlibDir>

</PropertyGroup>

<Import Project="$(ExternalProps)" Condition="$(ExternalProps) != '' and Exists('$(ExternalProps)')" />

<PropertyGroup>
<sqlite3Dir Condition="$(sqlite3Dir) == ''">$(ExternalsDir)sqlite-3.31.1.0\</sqlite3Dir>
<bz2Dir Condition="$(bz2Dir) == ''">$(ExternalsDir)bzip2-1.0.8\</bz2Dir>
<lzmaDir Condition="$(lzmaDir) == ''">$(ExternalsDir)xz-5.2.2\</lzmaDir>
<opensslDir Condition="$(opensslDir) == ''">$(ExternalsDir)openssl-1.1.1t\</opensslDir>
<opensslOutDir Condition="$(opensslOutDir) == ''">$(ExternalsDir)openssl-bin-1.1.1t\$(ArchName)\</opensslOutDir>
<opensslIncludeDir Condition="$(opensslIncludeDir) == ''">$(opensslOutDir)include</opensslIncludeDir>
<nasmDir Condition="$(nasmDir) == ''">$(ExternalsDir)\nasm-2.11.06\</nasmDir>
<zlibDir Condition="$(zlibDir) == ''">$(ExternalsDir)\zlib-1.2.12\</zlibDir>
</PropertyGroup>

<PropertyGroup>
<!-- Suffix for all binaries when building for debug -->
<PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) == 'Debug'">_d</PyDebugExt>

Expand Down
4 changes: 4 additions & 0 deletions PCbuild/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ _lzma
Homepage:
http://tukaani.org/xz/
_ssl
<<<<<<< HEAD
Python wrapper for version 1.1.1c of the OpenSSL secure sockets
=======
Python wrapper for version 1.1.1t of the OpenSSL secure sockets
>>>>>>> f42aca4d8d (gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727))
library, which is downloaded from our binaries repository at
https://github.com/python/cpython-bin-deps.

Expand Down
4 changes: 2 additions & 2 deletions Tools/ssl/multissltests.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
]

OPENSSL_RECENT_VERSIONS = [
"1.1.1n",
# "3.0.0-alpha2"
"1.1.1t",
"3.0.8"
]

LIBRESSL_OLD_VERSIONS = [
Expand Down

0 comments on commit e5bc753

Please sign in to comment.