Bug 2073310 (CVE-2022-1271)

Summary: CVE-2022-1271 gzip: arbitrary-file-write vulnerability
Product: [Other] Security Response Reporter: Vipul Nair <vinair>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: bdettelb, caswilli, chazlett, databases-maint, dffrench, dhalasz, dkuc, fjansen, gzaronik, jamartis, jary, jburrell, jkoehler, jnovy, jwong, jwon, kaycoth, kdudka, kshier, ljavorsk, lob+redhat, michal.skrivanek, micjohns, mike, mkleinhe, mmuzila, mperina, ngough, nobody, odubaj, panovotn, pjindal, pkubat, praiskup, psegedy, pstodulk, rfreiman, rgodfrey, rjones, saroy, sbonazzo, stcannon, sthirugn, tcarlin, tfister, tkasparek, tmeszaro, tsasak, vkrizan, vkumar, vmugicag, zmiklank
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gzip 1.12 Doc Type: If docs needed, set a value
Doc Text:
An arbitrary file write vulnerability was found in GNU gzip's zgrep utility. When zgrep is applied on the attacker's chosen file name (for example, a crafted file name), this can overwrite an attacker's content to an arbitrary attacker-selected file. This flaw occurs due to insufficient validation when processing filenames with two or more newlines where selected content and the target file names are embedded in crafted multi-line file names. This flaw allows a remote, low privileged attacker to force zgrep to write arbitrary files on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-01 14:42:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2101418, 2073312, 2073335, 2073336, 2073337, 2073338, 2073339, 2073340, 2073341, 2073342, 2073343, 2074385, 2074386, 2074469, 2091842, 2091843, 2091844, 2091845, 2091846, 2091847, 2091848, 2091849, 2091850, 2091851, 2101417    
Bug Blocks: 2073314    

Description Vipul Nair 2022-04-08 08:04:41 UTC
The following vulnerability was published for xz-utils and gzip
The bug would result in arbitrary-file-write vulnerability 

CVE-2022-1271[0]:
| zgrep, xzgrep: arbitrary-file-write vulnerability



For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2022-1271
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-1271
[1] https://www.openwall.com/lists/oss-security/2022/04/07/8
[2] https://git.tukaani.org/?p=xz.git;a=commit;h=69d1b3fc29677af8ade8dc15dba83f0589cb63d6
[3] https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html

Comment 1 Vipul Nair 2022-04-08 08:06:05 UTC
Created gzip tracking bugs for this issue:

Affects: fedora-all [bug 2073312]

Comment 9 Todd Zullinger 2022-04-16 19:30:10 UTC
Is there a fedora tracker for xz?

I filed a PR to apply the upstream patch:

  https://src.fedoraproject.org/rpms/xz/pull-request/7

Comment 10 Richard W.M. Jones 2022-04-17 09:14:01 UTC
(In reply to Todd Zullinger from comment #9)
> Is there a fedora tracker for xz?
> 
> I filed a PR to apply the upstream patch:
> 
>   https://src.fedoraproject.org/rpms/xz/pull-request/7

Thanks - I've merged this into Rawhide and will do the build soon and
look at bug 2073312 for other Fedora branches.

Comment 11 errata-xmlrpc 2022-04-26 16:45:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:1537 https://access.redhat.com/errata/RHSA-2022:1537

Comment 12 errata-xmlrpc 2022-04-26 17:12:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions

Via RHSA-2022:1592 https://access.redhat.com/errata/RHSA-2022:1592

Comment 13 errata-xmlrpc 2022-05-02 08:09:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2022:1665 https://access.redhat.com/errata/RHSA-2022:1665

Comment 14 errata-xmlrpc 2022-05-03 07:04:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

Via RHSA-2022:1676 https://access.redhat.com/errata/RHSA-2022:1676

Comment 15 errata-xmlrpc 2022-05-11 19:18:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2022:2191 https://access.redhat.com/errata/RHSA-2022:2191

Comment 16 errata-xmlrpc 2022-05-17 23:39:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:4582 https://access.redhat.com/errata/RHSA-2022:4582

Comment 17 Geert Hendrickx 2022-05-18 11:24:01 UTC
xzgrep is still not fixed.  
Upstream patch is at https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch and applies cleanly.

Comment 19 Sandipan Roy 2022-05-31 07:29:02 UTC
Created mingw-xz tracking bugs for this issue:

Affects: fedora-all [bug 2091842]


Created xz tracking bugs for this issue:

Affects: fedora-all [bug 2091843]

Comment 21 errata-xmlrpc 2022-06-03 13:48:41 UTC
This issue has been addressed in the following products:

  Red Hat Virtualization 4 for Red Hat Enterprise Linux 8

Via RHSA-2022:4896 https://access.redhat.com/errata/RHSA-2022:4896

Comment 22 Vipul Nair 2022-06-07 05:51:40 UTC
cancelling needinfo tracker have been filed.

Comment 23 errata-xmlrpc 2022-06-08 09:46:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:4940 https://access.redhat.com/errata/RHSA-2022:4940

Comment 24 errata-xmlrpc 2022-06-13 07:44:23 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions

Via RHSA-2022:4994 https://access.redhat.com/errata/RHSA-2022:4994

Comment 25 errata-xmlrpc 2022-06-13 09:17:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2022:4992 https://access.redhat.com/errata/RHSA-2022:4992

Comment 26 errata-xmlrpc 2022-06-13 09:18:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:4991 https://access.redhat.com/errata/RHSA-2022:4991

Comment 27 errata-xmlrpc 2022-06-13 09:33:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

Via RHSA-2022:4993 https://access.redhat.com/errata/RHSA-2022:4993

Comment 28 errata-xmlrpc 2022-06-15 11:11:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2022:5052 https://access.redhat.com/errata/RHSA-2022:5052

Comment 30 errata-xmlrpc 2022-06-30 07:31:46 UTC
This issue has been addressed in the following products:

  Red Hat Virtualization 4 for Red Hat Enterprise Linux 7

Via RHSA-2022:5439 https://access.redhat.com/errata/RHSA-2022:5439

Comment 31 Product Security DevOps Team 2022-07-01 14:42:19 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-1271