Commit Graph

379 Commits

Author SHA1 Message Date
Jeffery To 1236ebb505 python3: Update to 3.6.15
Includes fix for CVE-2013-0340 ("Billion Laughs" vulnerability).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-09-08 17:12:03 -04:00
Jeffery To ea046789ec
python3: Update to 3.6.14
Includes fix for CVE-2021-3426 (Information disclosure via pydoc).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-07-07 00:38:27 +08:00
Jeffery To 52ae66045d
python3: Update to 3.6.13
Includes fixes for:
* CVE-2021-3177 - ctypes: Buffer overflow in PyCArg_repr
* CVE-2021-23336 - urllib parse_qsl(): Web cache poisoning - semicolon
  as a query args separator

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-02-22 20:28:45 +08:00
Rosen Penev 4f4f708542
python3: fix host compilation with clang
Matched rpath parameter with Makefile.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from commit b40c40151c)
2020-12-07 15:50:44 -08:00
Jeffery To 5d988670ce
python3: Update to 3.6.12, remove backported patches
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-17 00:39:17 +08:00
Jeffery To e05705fa54
python3: Backport security fixes
This backports fixes for security issues, including:
* CVE-2020-14422: Hash collisions in IPv4Interface and IPv6Interface
* CVE-2019-20907: Infinite loop in the tarfile module

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-07-20 17:43:45 +08:00
Jeffery To 6417457339
python3: Update to 3.6.11
This contains a fix for CVE-2020-8492 (Denial of service in
urllib.request.AbstractBasicAuthHandler)[1].

[1]: https://docs.python.org/release/3.6.11/whatsnew/changelog.html#python-3-6-11-release-candidate-1

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-07-01 00:01:28 +08:00
Jeffery To 76a67189c5 python-openssl,python3-openssl: Add dependency on ca-bundle
The ssl module assumes OpenSSL can load the default trust anchors (root
CA certificates).

From https://github.com/openwrt/packages/issues/12209

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-05-20 17:28:02 +08:00
Jan Kardell e2aa53d376 Python: Fix compile of host modules
Add -rpath linker option to host build, pointing to staging/hostpkh/lib.
It's needed to find the correct host libs during runtime, without it the
hosts libs may be used instaead, causing failures.

Signed-off-by: Jan Kardell <jan.kardell@telliq.com>
(cherry picked from commit 0311e58bb6)
2020-05-20 17:28:02 +08:00
Jan Kardell 618771c3a3 Python3: Fix host build on OpenSUSE
The linker option -rpath is required to find libs in staging_dir. Now it
is included when building host modules. Without it the import test of
the _ctypes and _uuid modules would fail. The _ctypes module uses
libffi.so.6 from staging, but OpenSUSE LEAP 15 has libffi.so.7.
It will also fail on LEAP 42.x, Fedora28 and 29 and future or old
versions of Ubuntu.

Fix needed in master and 18.06 branches.

Signed-off-by: Jan Kardell <jan.kardell@telliq.com>
(cherry picked from commit 6ade5a1e3a)
2020-05-20 17:28:02 +08:00
Jeffery To dd5896c7c4 python: Update to 2.7.18, refresh patches
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-04-29 06:08:03 +08:00
Josef Schlehofer 29fe5f91d7
python3: Updated to version 3.6.10
Remove backported patches:
025-bpo-34155-Dont-parse-domains-containing-GH-13079-GH-.patch
026-bpo-38243-xmlrpc.server-Escape-the-server_title-GH-1.patch

Fixes CVE-2019-16056

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-12-21 18:12:34 +01:00
Josef Schlehofer 0f0c062d3c
python-cryptography: fix CVE-2018-10903
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-10-25 01:30:27 +02:00
Josef Schlehofer 5a9d222e5c
python-cryptography: Add support for LibreSSL 2.7.x
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-10-25 01:30:27 +02:00
Jeffery To f184eb5f0e python: Update to 2.7.17, refresh patches
Patches already merged and so removed:
* 019-bpo-36216-Add-check-for-characters-in-netloc-that-normalize-to-separators-GH-12216.patch
* 020-bpo-36216-Only-print-test-messages-when-verbose-GH-12291.patch
* 021-2.7-bpo-35121-prefix-dot-in-domain-for-proper-subdom.patch
* 027-bpo-38243-Escape-the-server-title-of-DocXMLRPCServer.patch
* 028-bpo-34155-Dont-parse-domains-containing-GH-13079.patch

Patches no longer necessary and so removed:
* 017_lib2to3_fix_pyc_search.patch

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from 83b300aa83)
2019-10-22 01:04:43 +08:00
Alexandru Ardelean e84deea057
python3-pip: fix install rule
This seems to have slipped for some time. No idea if it ever worked.
It could be that this worked at some point.

In any case, the shebang is properly updated now.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
(cherry-picked from commit 1b96dc0171)
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(bump PKG_RELEASE for python3-pip)
2019-10-08 09:48:19 +02:00
Jeffery To dad9a1a2a4 python: Fix CVE-2019-16056, CVE-2019-16935
These patches address issues:
CVE-2019-16056: email.utils.parseaddr mistakenly parse an email
CVE-2019-16935: A reflected XSS in python/Lib/DocXMLRPCServer.py

Links to Python issues:
https://bugs.python.org/issue34155
https://bugs.python.org/issue38243

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-10-05 00:58:08 +08:00
Josef Schlehofer 126cdd7c6b
python3: fix CVE-2019-16056 and delete two patches
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-09-30 17:23:40 +02:00
Josef Schlehofer 0d9eeca453
python3: backport three security patches
Fixes: CVE-2019-16935

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry-picked from commit 80def9e)
2019-09-30 10:03:35 +02:00
Rosen Penev 8eca9c9164
python-crypto: Fix two CVEs
CVE-2013-7459 and CVE-2018-6594. Both patches taken from Fedora.

Also took the liberty to update the PKG_SOURCE_URL to a standard one.

Updated the home URL as well.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from 32b23e28ad)
2019-09-26 19:42:54 -07:00
Rosen Penev f292062517
django: Update to 1.8.19
Fixes:

CVE-2018-7536
CVE-2018-7537

Switches to pypi, as in upstream. Updated maintainer as well.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-09-20 11:45:45 -07:00
Jeffery To af975f0f30
python,python3: Fix overridden usr/bin symlinks
Currently, all files in usr/bin (presumably all Python scripts) are run
through sed to replace the shebang; sed will overwrite the file whether
or not a match is found. This causes symlinks to be overridden and made
into copies of their targets. python[3]-base and python[3]-dev are
affected by this.

This adds the --follow-symlinks flag to sed, in addition to using
$(SED), so that symlinks are not overridden.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-08-08 13:38:37 +02:00
Alexandru Ardelean 421c58a946
python,python3: move shebang handle in install script
This extends the Python[3] shebang fixup to all packages.
Only Python scripts in `/usr/bin` will be handled at the moment. Later it
may make sense to also cover executables in `/bin`, though typically Python
executables shouldn't be placed there.

Previously the shebang handling was only done for python[3]-pip &
python[3]-setuptools.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2019-08-08 13:38:36 +02:00
Jeffery To 5cb4c348a7 python,python3: Fix ctypes.util.find_library()
Python's ctypes.util.find_library() function currently doesn't work for
musl libraries/systems[1].

This adds a patch to fix this function, based on a patch from Alpine
Linux[2].

Fixes #9448.

[1]: https://bugs.python.org/issue21622
[2]: https://git.alpinelinux.org/aports/tree/main/python2/musl-find_library.patch

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-07-22 21:38:08 +08:00
Josef Schlehofer d16a931db4
python: add patch for CVE-2018-20852
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-07-22 15:22:56 +02:00
Alexandru Ardelean 2402c223df
python: bump to version 2.7.16
This change updates Python to version 2.7.16, which is a bugfix release
in the Python 2.7 series.
This also removes patches back-ported from upstream.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2019-07-22 15:22:55 +02:00
Josef Schlehofer ae21f4990d
python3: update to version 3.6.9
3.6.9 is the latest security fix release of Python 3.6.

- Fixes: CVE-2018-20852, CVE-2019-9948, CVE-2019-9740, CVE-2019-5010
- Refreshed patches
- Removed a few backports patches

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-07-22 10:17:35 +02:00
Josef Schlehofer 8459433eb8
python-urllib3: update to 1.24.3
- Fixes CVE-2019-9740, CVE-2019-11324
- RFC 3986 compliant
- Fix TITLE, which was too long for make menuconfig
- Add PKG_LICENSE_FILES
- Remove current maintainer

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-05-08 19:23:10 +02:00
Jeffery To fbcac2d532 python,python3: Fix CVE-2019-9636 - urlsplit missing NFKC normalization
These patches address issue:
CVE-2019-9636: urlsplit does not handle NFKC normalization

Link to Python issue:
https://bugs.python.org/issue36216

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-04-21 00:52:30 +08:00
Rosen Penev e47fe43ea5 Jinja2: Update to 2.10
Switch URL to a deterministic one.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-03-19 00:19:46 +01:00
Karel Kočí 2324d341ea
Jinja2: add missing dependency on markupsafe
Signed-off-by: Karel Kočí <karel.koci@nic.cz>
2019-03-05 17:20:36 +01:00
Alexandru Ardelean d0f5ae180c [18.06] python3: fix [CVE-2018-20406]
Link to Python bug:
  https://bugs.python.org/issue34656

Upstream commit:
  71a9c65e74

OpenWrt 18.06 contains version Python 3.6.5, which doesn't contain this
fix.
Python 2.7 is not affected.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2019-02-13 10:27:22 +02:00
Jeffery To 4368783e97 python-idna: Add missing dependency on python(3)-codecs
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-01-27 20:26:48 +08:00
Jeffery To 480e4d7e88 python/python3: Fix lib2to3 fixes search
This is the patch from c98b12d9a9 (#7931),
applied for both python 2 and 3.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-01-13 06:14:36 +08:00
Hannu Nyman 85bfefb561
Merge pull request #7757 from jefferyto/openwrt-18.06-python-dist-info
[openwrt-18.06] python/python3: fix .dist-info missing for setuptools and pip
2019-01-01 21:55:43 +02:00
Hannu Nyman 94b3e50e04
Merge pull request #7820 from commodo/18-06-python3-CVE-2018-14647
[18.06] python3: backport CVE-2018-14647 patch from upstream
2018-12-31 22:33:38 +02:00
Alexandru Ardelean 34dec81901 python3: backport CVE-2018-14647 patch from upstream [18.06]
These patches are backports from Python 3.6 upstream.
The security issue is described here:
  https://nvd.nist.gov/vuln/detail/CVE-2018-14647

The Python bug report:
  https://bugs.python.org/issue34623

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2018-12-31 19:20:27 +02:00
Alexandru Ardelean 3785db429f python: backport CVE-2018-14647 patches from upstream [18.06]
These patches are backports from Python 2.7 upstream.
The security issue is described here:
  https://nvd.nist.gov/vuln/detail/CVE-2018-14647

The Python bug report:
  https://bugs.python.org/issue34623

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2018-12-31 18:58:19 +02:00
Jeffery To e3f32b75b3 python/python3: fix .dist-info missing for setuptools and pip
Without .dist-info (similar to .egg-info), setuptools and pip are not
discoverable by pkg_resources.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2018-12-23 03:28:02 +08:00
Jeffery To 9250b7283a twisted: update to 18.4.0, refresh patches
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2018-06-26 04:58:14 +08:00
Jeffery To d25196bc28 python-zope-interface: update to 4.5.0
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2018-06-26 04:57:35 +08:00
Jeffery To e7af1e992d python-pyasn1: update to 0.4.3
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2018-06-26 04:57:25 +08:00
Jeffery To 8c545ae8dd python-ply: update to 3.11
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2018-06-26 04:57:16 +08:00
Jeffery To dcdc8807a0 python-ipaddress: update to 1.0.22
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2018-06-26 04:57:04 +08:00
Jeffery To 4d225bb519 python-hyperlink: update to 18.0.0
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2018-06-26 04:56:53 +08:00
Jeffery To c5a5b3c74c python-automat: update to 0.7.0, refresh patches
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2018-06-26 04:56:38 +08:00
Jeffery To 2a7c48c7fa python-attrs: update to 18.1.0
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2018-06-26 04:56:11 +08:00
Alexandru Ardelean 995b48121e python,python3: remove `--ignore-installed` flag for host packages
This was copied over from python-packages, when support for installing
packages host-side (via pip) was added.

Based on the discussion on this commit:
  612c53fc6c
it was mentioned that removing this may add more benefit in terms of
reducing build time, because packages won't get reinstalled every time.

I'm not entirely sure about any potential side-effects of this, but it's
worth trying it out.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2018-05-14 12:11:00 +03:00
Alexandru Ardelean b7d1d2149e python3: update to version 3.6.5
Add PKG_RELEASE for setuptools and pip.
Refresh all patches.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2018-05-03 14:46:35 +03:00
Alexandru Ardelean 2ef484615d python: update to version 2.7.15
This also updates pip and setuptools.
With this occasion, they also get PKG_RELEASEs of their own.

Dropped patch 011-remove-setupterm-definition.patch
Manually re-applied 005-fix-bluetooth-support.patch
Ran make package/python/refresh to refresh other patches.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2018-05-03 14:46:12 +03:00