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

Vulnerability roundup 84: python-2.7.18: 4 advisories #88384

Closed
4 tasks
ckauhaus opened this issue May 20, 2020 · 16 comments
Closed
4 tasks

Vulnerability roundup 84: python-2.7.18: 4 advisories #88384

ckauhaus opened this issue May 20, 2020 · 16 comments

Comments

@ckauhaus
Copy link
Contributor

search, files

Scanned versions: nixos-20.03: 82b5f87; nixos-unstable: 0f5ce2f. May contain false positives.

@wamserma
Copy link
Member

Python 2.7.18 is EOL. The only solutions are to mark it as insecure or to remove it.

@vcunat
Copy link
Member

vcunat commented May 21, 2020

There are some distributions that still guarantee support of Python 2 for a few years (say, RHEL), so if someone from our community is sufficiently motivated, it shouldn't be too hard to piggyback on their fixes. In any case, we should try to migrate everything away from it, but I suspect in some cases it will still be very hard.

@wamserma
Copy link
Member

@vcunat Agree. But we should have a clear statement in the docs stating that Python 2.7.18 gets some maintenance until it can be dropped, but that we can not guarantee timely fixes for security vulns and porting of patches from other distros.

@vcunat
Copy link
Member

vcunat commented May 22, 2020

Yes, I agree with marking it as insecure unless/until someone steps up and promises to do this work.

EDIT: but we'll need to check how many packages gets killed by that step – most may be just from "safe" build-time-only dependencies (possibly transitive ones). And 20.03 release may be a problem.

@wamserma
Copy link
Member

By summoning the powers of Nix it should be possible to produce a list of packages that specifically depend on python2. Of course, 20.03 hast to keep python2. But given that the EOL did nor come as a surprise (but after 20.03 was released), we have to keep it in, but can give porting fixes lower priority than making it disposable before 20.09.

@vcunat
Copy link
Member

vcunat commented May 22, 2020

Too bad

$ ./maintainers/scripts/rebuild-amount.sh HEAD HEAD^
  23109 x86_64-darwin
  33322 x86_64-linux

(I won't even post the --print version.)

@wamserma
Copy link
Member

That is because most Python stuff is built against all available versions. We need those packages, that specifically request python2 or have sth. like !py3k. Some sort of difference of sets.

@vcunat
Copy link
Member

vcunat commented May 22, 2020

That is not the main reason. pythonPackages set is not as large at all. 30k is roughly half of all packages.

@wamserma
Copy link
Member

Yes, but still I think/hope that most of these would not break if they had only python3 available - unless there is a huge pile of old unmaintained stuff in Nixpkgs.

@vcunat
Copy link
Member

vcunat commented May 22, 2020

That's possible. It's also possible that majority is caused by a very small handful of packages (I don't know how to check easily).

@andersk
Copy link
Contributor

andersk commented May 22, 2020

A quick grep shows only a few hundred direct references to python2 in the tree, so I imagine most of indirect ones go via the default python = python2 alias. Maybe the first goal should be to change that alias, remove it, or deprecate it with a warning?

@ckauhaus
Copy link
Contributor Author

ckauhaus commented Jun 16, 2020

What we see here is for some part not a problem specific to NixOS, but one of the Python community at large. Even 10+ years after the initial release of Python 3, there is still a lot of Python 2 stuff floating around that seems not to get migrated to Python 3.

This problem is too large to be solved entirely inside NixOS. What we could do is this:

  • Change the python alias so that anyone gets Python 3 by default
  • Deprecate or remove packages which are still incompatible with Python 23 after a while

A first step for 20.09 would be to change the default alias, move as many packages as possible to Python 3 and issue a warning for the remaining ones.

@wamserma
Copy link
Member

This has already been discussed here: https://discourse.nixos.org/t/upcoming-python-breakage/7554/3?u=wamserma

@nixos-discourse

This comment has been minimized.

@ckauhaus
Copy link
Contributor Author

None of the mentioned CVEs have a fix for Python2 readily available (and one is Windows only). Let's close this.

@wamserma
Copy link
Member

Actually, we should keep this open until python2 is marked as insecure in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants