Report forwarded
to bug-guix@gnu.org: bug#46631; Package guix.
(Fri, 19 Feb 2021 03:22:01 GMT) (full text, mbox, link).
Acknowledgement sent
to Leo Famulari <leo@famulari.name>:
New bug report received and forwarded. Copy sent to bug-guix@gnu.org.
(Fri, 19 Feb 2021 03:22:01 GMT) (full text, mbox, link).
Quoting from MITRE:
------
Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in
_ctypes/callproc.c, which may lead to remote code execution in certain
Python applications that accept floating-point numbers as untrusted
input, as demonstrated by a 1e300 argument to c_double.from_param. This
occurs because sprintf is used unsafely.
------
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3177
There is not yet an upstream release to fix the issue in the 3.8 series
that we distribute. I believe there are patches we can cherry-pick. Can
somebody find them?
I assume that Python is considered to be "graft-able". Can anyone
confirm?
The upstream bug report:
https://bugs.python.org/issue42938
Information forwarded
to bug-guix@gnu.org: bug#46631; Package guix.
(Fri, 19 Feb 2021 15:36:01 GMT) (full text, mbox, link).
I pushed a fix for Python 3.9 in commit
f08c7cb0c75e7d5305c82d6a4af68ddf74fb08b1.
But, we use Python 3.8 for everything, and my patch (attached) fails to
apply for some reason. It does work when I apply the new bug fix patch
"by hand" onto the Guix source code for our current python-3.8 package.
On Fri, Feb 19, 2021 at 06:12:58PM -0500, Leo Famulari wrote:
> But, we use Python 3.8 for everything, and my patch (attached) fails to
> apply for some reason. It does work when I apply the new bug fix patch
> "by hand" onto the Guix source code for our current python-3.8 package.
More weirdness: When I apply the patch to the python-3.8 package (that
is, without setting up a grafted replacement), it works. So I am
definitely doing something wrong here.
Information forwarded
to bug-guix@gnu.org: bug#46631; Package guix.
(Fri, 19 Feb 2021 23:42:01 GMT) (full text, mbox, link).
On Fri, Feb 19, 2021 at 06:23:49PM -0500, Leo Famulari wrote:
> More weirdness: When I apply the patch to the python-3.8 package (that
> is, without setting up a grafted replacement), it works. So I am
> definitely doing something wrong here.
Here is a new patch that I'm currently building. I think I had composed
the package inheritance incorrectly in my previous patch.
Hi Leo,
Leo Famulari <leo@famulari.name> skribis:
> From b62969d52add462fc1b8b4bd1e0a3c4d53a39864 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Fri, 19 Feb 2021 18:09:57 -0500
> Subject: [PATCH] gnu: Python: Fix CVE-2021-3177.
>
> * gnu/packages/patches/python-3.8-CVE-2021-3177.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/python.scm (python-3.8): Define with PACKAGE/INHERIT.
> [replacement]: New field.
> (python-3.8/fixed): New variable.
[...]
> (define-public python-3.8
> - (package (inherit python-2)
> + (package/inherit python-2
> (name "python")
> + (replacement python-3.8/fixed)
You can keep (inherit …) because the effect of ‘package/inherit’ is just
to preserve replacements, which is unnecessary here.
Apart from that, the Guix side of things LGTM.
Thanks for working on it!
Ludo’.
Added tag(s) security.
Request was from Ludovic Courtès <ludo@gnu.org>
to control@debbugs.gnu.org.
(Mon, 22 Feb 2021 09:16:02 GMT) (full text, mbox, link).
Reply sent
to Leo Famulari <leo@famulari.name>:
You have taken responsibility.
(Tue, 23 Feb 2021 19:18:02 GMT) (full text, mbox, link).
Notification sent
to Leo Famulari <leo@famulari.name>:
bug acknowledged by developer.
(Tue, 23 Feb 2021 19:18:02 GMT) (full text, mbox, link).
On Mon, Feb 22, 2021 at 09:08:14AM +0100, Ludovic Courtès wrote:
> You can keep (inherit …) because the effect of ‘package/inherit’ is just
> to preserve replacements, which is unnecessary here.
I used to know that... it's been a while and I forgot, and had trouble
understanding the package/inherit docstring. So I pushed a commit that I
hope clarifies it.
> Apart from that, the Guix side of things LGTM.
Pushed as 84e082e31706411e7f9c3189a83f8ed0b4016fe7
> Thanks for working on it!
Thanks for the review!
bug archived.
Request was from Debbugs Internal Request <help-debbugs@gnu.org>
to internal_control@debbugs.gnu.org.
(Wed, 24 Mar 2021 11:24:06 GMT) (full text, mbox, link).
Debbugs is free software and licensed under the terms of the
GNU Public License version 2. The current version can be
obtained from https://bugs.debian.org/debbugs-source/.