All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rahul Taya" <Rahul.Taya@kpit.com>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: openembedded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: [oe] [meta-python2][dunfell][PATCH] python: Add fix for CVE-2019-9674
Date: Thu, 25 Feb 2021 16:19:25 +0000	[thread overview]
Message-ID: <BMXPR01MB34313781E1537C2248D69382F29E9@BMXPR01MB3431.INDPRD01.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CA+chaQeuX0JXcWq1WhQEX9mkS67_-ZSpMhsJ-m0ow7JJ3boTgA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 11384 bytes --]

Hi Martin,

I have tested my changes before sending to you or ML i don’t know why it is failing now at your side.

Thanks and Regards,
Rahul

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Martin Jansa <martin.jansa@gmail.com>
Sent: Thursday, February 25, 2021 8:25:50 PM
To: Rahul Taya <Rahul.Taya@kpit.com>
Cc: openembedded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: [oe] [meta-python2][dunfell][PATCH] python: Add fix for CVE-2019-9674

Hi,

normally you should fork meta-python2 and send a link to meta-python2 change I can cherry-pick, not the blob in otherwise empty repo.

But as I've said in previous reply, I've already manually applied your change in meta-python2 master-next where it's now failing:


ERROR: python-native-2.7.18-r0 do_patch: Fuzz detected:

Applying patch CVE-2019-9674.patch
patching file Doc/library/zipfile.rst
Hunk #1 succeeded at 554 with fuzz 2 (offset -20 lines).


The context lines in the patches can be updated with devtool:

    devtool modify python-native
    devtool finish --force-patch-refresh python-native <layer_path>

Don't forget to review changes done by devtool!

ERROR: python-native-2.7.18-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz]


so I'll fix this as well, but next time please better test your changes (nghttp2 patch also didn't apply, see my reply there, not sure if you have fixed that in v2)


Regards,



On Thu, Feb 25, 2021 at 9:09 AM Rahul Taya <Rahul.Taya@kpit.com<mailto:Rahul.Taya@kpit.com>> wrote:
Hi Martin,

I removed the emoticons and uploaded the patch to my git repo pls access below link:

https://github.com/Rahult9/upstream_patch/blob/main/CVE-2019-9674.patch<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRahult9%2Fupstream_patch%2Fblob%2Fmain%2FCVE-2019-9674.patch&data=04%7C01%7CRahul.Taya%40kpit.com%7C041bfdaed11b41468d7508d8d99d7992%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C637498617748074264%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qndZUNjt2mXpJv6EukwdQCDEYFZkSUbV38AP%2FQrcG30%3D&reserved=0>


Thanks and Regards,
Rahul Taya
________________________________
From: Martin Jansa <martin.jansa@gmail.com<mailto:martin.jansa@gmail.com>>
Sent: Thursday, February 18, 2021 10:58 PM
To: Rahul Taya <Rahul.Taya@kpit.com<mailto:Rahul.Taya@kpit.com>>
Cc: openembedded-devel <openembedded-devel@lists.openembedded.org<mailto:openembedded-devel@lists.openembedded.org>>; Khem Raj <raj.khem@gmail.com<mailto:raj.khem@gmail.com>>; Nisha Parrakat <Nisha.Parrakat@kpit.com<mailto:Nisha.Parrakat@kpit.com>>; Harpritkaur Bhandari <Harpritkaur.Bhandari@kpit.com<mailto:Harpritkaur.Bhandari@kpit.com>>
Subject: Re: [oe] [meta-python2][dunfell][PATCH] python: Add fix for CVE-2019-9674

"git am" doesn't like those emoticons in the .patch file..

git am ~/py2/cur/16136689*
error: cannot convert from 8bit to UTF-8
fatal: could not parse patch

either drop them or upload it to some git repo so I can cherry-pick it from there.

On Thu, Feb 18, 2021 at 3:18 PM Rahul Taya <Rahul.Taya@kpit.com<mailto:Rahul.Taya@kpit.com>> wrote:
For python and python-native added patch to fix
CVE-2019-9674

Signed-off-by: Rahul Taya <Rahul.Taya@kpit.com<mailto:Rahul.Taya@kpit.com>>
---
 recipes-devtools/python/python.inc            |  1 +
 .../python/python/CVE-2019-9674.patch         | 83 +++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 recipes-devtools/python/python/CVE-2019-9674.patch

diff --git a/recipes-devtools/python/python.inc b/recipes-devtools/python/python.inc
index a4ba0c5..787f23e 100644
--- a/recipes-devtools/python/python.inc
+++ b/recipes-devtools/python/python.inc
@@ -8,6 +8,7 @@ INC_PR = "r1"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=203a6dbc802ee896020a47161e759642"

 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz<https://apc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.python.org%2Fftp%2Fpython%2F%24%257BPV%257D%2FPython-%24%257BPV%257D.tar.xz&data=04%7C01%7CRahul.Taya%40kpit.com%7C041bfdaed11b41468d7508d8d99d7992%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C637498617748084260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kHGRcUbtYiE80jPSXSA1OrX6EcDTe2PP0bpSBRFyDyo%3D&reserved=0> \
+           file://CVE-2019-9674.patch \
            "

 SRC_URI[sha256sum] = "b62c0e7937551d0cc02b8fd5cb0f544f9405bafc9a54d3808ed4594812edef43"
diff --git a/recipes-devtools/python/python/CVE-2019-9674.patch b/recipes-devtools/python/python/CVE-2019-9674.patch
new file mode 100644
index 0000000..647d9da
--- /dev/null
+++ b/recipes-devtools/python/python/CVE-2019-9674.patch
@@ -0,0 +1,83 @@
+From 3ba51d587f6897a45301ce9126300c14fcd4eba2 Mon Sep 17 00:00:00 2001
+From: JunWei Song <sungboss2004@gmail.com<mailto:sungboss2004@gmail.com>>
+Date: Wed, 11 Sep 2019 23:04:12 +0800
+Subject: [PATCH] bpo-36260: Add pitfalls to zipfile module documentation
+ (#13378)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* bpo-36260: Add pitfalls to zipfile module documentation
+
+We saw vulnerability warning description (including zip bomb) in Doc/library/xml.rst file.
+This gave us the idea of documentation improvement.
+
+So, we moved a little bit forward :P
+And the doc patch can be found (pr).
+
+* fix trailing whitespace
+
+* 📜🤖 Added by blurb_it.
+
+* Reformat text for consistency.
+
+Upstream-Status: Backport[http://archive.ubuntu.com/ubuntu/pool/main/p/python3.5/python3.5_3.5.2-2ubuntu0~16.04.12.debian.tar.xz<https://apc01.safelinks.protection.outlook.com/?url=http:%2F%2Farchive.ubuntu.com%2Fubuntu%2Fpool%2Fmain%2Fp%2Fpython3.5%2Fpython3.5_3.5.2-2ubuntu0~16.04.12.debian.tar.xz&data=04%7C01%7CRahul.Taya%40kpit.com%7C041bfdaed11b41468d7508d8d99d7992%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C637498617748084260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hDH63L6ISEUTBzc6FJzKsTnt74tsvDdAUijNSsrrT54%3D&reserved=0>]
+CVE: CVE-2019-9674
+Link: http://archive.ubuntu.com/ubuntu/pool/main/p/python3.5/python3.5_3.5.2-2ubuntu0~16.04.12.debian.tar.xz<https://apc01.safelinks.protection.outlook.com/?url=http:%2F%2Farchive.ubuntu.com%2Fubuntu%2Fpool%2Fmain%2Fp%2Fpython3.5%2Fpython3.5_3.5.2-2ubuntu0~16.04.12.debian.tar.xz&data=04%7C01%7CRahul.Taya%40kpit.com%7C041bfdaed11b41468d7508d8d99d7992%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C637498617748094253%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QM0y6ILLU8vDIBdLMC2vxuuJxStiYC4M7ZKUIzvh2NM%3D&reserved=0>
+Comment: From the original patch skipped changes for file
+Misc/NEWS.d/next/Documentation/2019-06-04-09-29-00.bpo-36260.WrGuc-.rst
+as this file is not present in our source code.
+---
+ Doc/library/zipfile.rst                       | 41 +++++++++++++++++++
+ 1 files changed, 41 insertions(+)
+
+diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
+index b421ea5..2e0a91d 100644
+--- a/Doc/library/zipfile.rst
++++ b/Doc/library/zipfile.rst
+@@ -574,4 +574,45 @@ Instances have the following attributes:
+
+    Size of the uncompressed file.
+
++Decompression pitfalls
++----------------------
++
++The extraction in zipfile module might fail due to some pitfalls listed below.
++
++From file itself
++~~~~~~~~~~~~~~~~
++
++Decompression may fail due to incorrect password / CRC checksum / ZIP format or
++unsupported compression method / decryption.
++
++File System limitations
++~~~~~~~~~~~~~~~~~~~~~~~
++
++Exceeding limitations on different file systems can cause decompression failed.
++Such as allowable characters in the directory entries, length of the file name,
++length of the pathname, size of a single file, and number of files, etc.
++
++Resources limitations
++~~~~~~~~~~~~~~~~~~~~~
++
++The lack of memory or disk volume would lead to decompression
++failed. For example, decompression bombs (aka `ZIP bomb`_)
++apply to zipfile library that can cause disk volume exhaustion.
++
++Interruption
++~~~~~~~~~~~~
++
++Interruption during the decompression, such as pressing control-C or killing the
++decompression process may result in incomplete decompression of the archive.
++
++Default behaviors of extraction
++~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++
++Not knowing the default extraction behaviors
++can cause unexpected decompression results.
++For example, when extracting the same archive twice,
++it overwrites files without asking.
++
++
++.. _ZIP bomb: https://en.wikipedia.org/wiki/Zip_bomb<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FZip_bomb&data=04%7C01%7CRahul.Taya%40kpit.com%7C041bfdaed11b41468d7508d8d99d7992%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C637498617748104250%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=82Tp%2Fa2aYAafpAETzBuxKqwKZjKo1kqGrfMLqqm3luo%3D&reserved=0>
+ .. _PKZIP Application Note: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT<https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpkware.cachefly.net%2Fwebdocs%2Fcasestudies%2FAPPNOTE.TXT&data=04%7C01%7CRahul.Taya%40kpit.com%7C041bfdaed11b41468d7508d8d99d7992%7C3539451eb46e4a26a242ff61502855c7%7C0%7C0%7C637498617748104250%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=VxtIgbD8ZIPw1x23s5QxHEeE51CEvglHimXAY6PytiQ%3D&reserved=0>
--
2.17.1

This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.



This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.
This message contains information that may be privileged or confidential and is the property of the KPIT Technologies Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Technologies Ltd. does not accept any liability for virus infected mails.

[-- Attachment #2: Type: text/html, Size: 18539 bytes --]

  reply	other threads:[~2021-02-25 16:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 15:23 [meta-python2][dunfell][PATCH] python: Add fix for CVE-2019-9674 Rahul Taya
2021-02-18 15:19 ` [oe] " akuster
2021-02-18 17:29   ` Martin Jansa
2021-02-18 17:28 ` Martin Jansa
2021-02-25  8:09   ` Rahul Taya
2021-02-25 14:55     ` Martin Jansa
2021-02-25 16:19       ` Rahul Taya [this message]
2021-02-25 17:03         ` Martin Jansa
2021-03-01 14:25           ` Rahul Taya
2021-03-01 14:46             ` Martin Jansa
2021-03-03 13:51               ` Rahul Taya
2021-03-03 14:33                 ` Martin Jansa
     [not found]                   ` <BMXPR01MB3431C751D5DCF36F6DC7B1C1F2989@BMXPR01MB3431.INDPRD01.PROD.OUTLOOK.COM>
2021-03-03 15:52                     ` Martin Jansa
2021-03-16  7:25                       ` Rahul Taya
2021-03-17  4:43                         ` akuster
2021-03-17  7:01                           ` Rahul Taya
     [not found]   ` <8614.1614238566433967267@lists.openembedded.org>
2021-02-25 11:58     ` Private: " Martin Jansa
2021-02-19  2:02 ` Anuj Mittal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BMXPR01MB34313781E1537C2248D69382F29E9@BMXPR01MB3431.INDPRD01.PROD.OUTLOOK.COM \
    --to=rahul.taya@kpit.com \
    --cc=martin.jansa@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.