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

gzip from Ubuntu Jammy doesn't execute #8219

Open
1 of 2 tasks
iBug opened this issue Apr 1, 2022 · 32 comments
Open
1 of 2 tasks

gzip from Ubuntu Jammy doesn't execute #8219

iBug opened this issue Apr 1, 2022 · 32 comments
Labels

Comments

@iBug
Copy link

iBug commented Apr 1, 2022

Version

Microsoft Windows [Version 10.0.19044.1586]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

4.4.0-19041-Microsoft

Distro Version

Ubuntu 22.04 "Jammy Jellyfish"

Other Software

GZip version 1.10-4ubuntu3 and 1.10-4ubuntu4 amd64.

Repro Steps

  • apt install gzip=1.10-4ubuntu3 then run gzip.
  • apt install gzip=1.10-4ubuntu4 then run gzip.

Expected Behavior

No error shows up.

Actual Behavior

sh: 1: gzip: Exec format error

The binary doesn't execute, so no strace.

Diagnostic Logs

Similar to that one, the same binary runs perfectly OK on a native Ubuntu Jammy machine. However, this time the binary is 97520 bytes and no section points outside this range.

Dissected binary using Wireshark: https://paste.ubuntu.com/p/nc2v6ZSRHW/

The previous version gzip 1.10-4ubuntu1 is fine, so I've installed that one instead and setting apt-mark hold for now.

It's very interesting that only gzip is found problematic. And it's the same program as 3 years ago. Time to wonder if gzip has any magic to break on WSL1.

@hzqmwne
Copy link

hzqmwne commented Apr 8, 2022

The old version gzip 1.10-4ubuntu1 works well, and the new version gzip 1.10-4ubuntu3 triggers this issue.

I compare their program headers by readelf -l gzip command, and here are the LOAD segments:
For 1.10-4ubuntu1 (which has no bug):

  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  ...
  LOAD           0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000001fc0 0x0000000000001fc0  R      0x1000
  LOAD           0x0000000000002000 0x0000000000002000 0x0000000000002000
                 0x000000000000e405 0x000000000000e405  R E    0x1000
  LOAD           0x0000000000011000 0x0000000000011000 0x0000000000011000
                 0x00000000000035d0 0x00000000000035d0  R      0x1000
  LOAD           0x0000000000014690 0x0000000000015690 0x0000000000015690
                 0x0000000000000d88 0x0000000000000d88  RW     0x1000
  LOAD           0x0000000000000000 0x0000000000018000 0x0000000000018000
                 0x0000000000000000 0x00000000000ca810  RW     0x1000
  ...

and for 1.10-4ubuntu3 (which has the bug):

  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  ...
  LOAD           0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000001fa8 0x0000000000001fa8  R      0x1000
  LOAD           0x0000000000002000 0x0000000000002000 0x0000000000002000
                 0x000000000000e319 0x000000000000e319  R E    0x1000
  LOAD           0x0000000000011000 0x0000000000011000 0x0000000000011000
                 0x00000000000036a8 0x00000000000036a8  R      0x1000
  LOAD           0x0000000000016690 0x0000000000016690 0x0000000000016690
                 0x0000000000000d88 0x00000000000cc180  RW     0x2000
  ...

Notice that the buggy version has a strange LOAD segment with Align 0x2000, and after patching the 0x2000 to 0x1000 (by modifying only one byte of gzip binary at offset 0x189 from 0x20 to 0x10), the bug disappears and the patched binary works well!

So, maybe WSL1 makes a wrong assumption that the p_align value is 0x1000. It is just a bug in WSL1 rather than Ubuntu, and seems quite easy to fix.

@iBug
Copy link
Author

iBug commented Apr 9, 2022

Gzip 1.10-4ubuntu4 is out and is also affected. The binary is identical to 1.10-4ubuntu3 except for some "ID" part, namely:

  • 20 bytes starting from 0x378
  • 38 bytes starting from 0x17418
  • 4 bytes starting from 0x17448

File length remains 97520 (0x17CF0)

The new binary, as you'd imagine, works well after manually patching byte 0x189 from 0x20 to 0x10.

@hzqmwne
Copy link

hzqmwne commented Apr 9, 2022

By reversing lxcore.sys, the real reason of this bug is that WSL1 assumes all p_align member in PT_LOAD program headers must be the same value, which is not correct. (See elf(5) — Linux manual page, there is not such assumption for p_align)

Part of decompilation pesudo C code of lxcore.sys (version 10.0.22000.1 from Windows 11 21H2 22000.556):
lxcore.sys.zip

__int64 __fastcall LxpElfInfoParse(__int128 *a1, unsigned __int64 a2, _OWORD *a3)    // RVA 0x1C004DC60
{
...
    if ( (_DWORD)v61 == 0x464C457F )    // "\x7fELF"
    {
...
      v46 = 0i64;
...
        v19 = *(__m128i *)v18;    // typeof(v18) is "Elf64_PHdr *"
        v58 = v19;
        v51 = v19;
        v20 = *((_OWORD *)v18 + 1);    // Elf64_PHdr.p_vaddr
        v60 = v20;
        v52 = v20;
        v21 = *((__m128i *)v18 + 2);
        v59 = v21;
        v53 = v21;
        v22 = *((_QWORD *)v18 + 6);    // Elf64_PHdr.p_align
        v54 = v22;
        v23 = _mm_cvtsi128_si32(v19);    // Elf64_PHdr.p_type
        if ( v23 == 3 )    // PT_INTERP
        {
...
        if ( v23 == 1 )    // PT_LOAD
        {
...
            if ( !v54 || (v54 & 0xFFF) != 0 )    // check p_align is multiple of page size
            {
              v5 = "LxpElfInfoParse: LocalProgramHeader.Align\n";
              v6 = 541;
              goto LABEL_5;
            }
            if ( (unsigned __int64)v52 % v54 != v24 % v54 )    // check "p_vaddr % p_align == p_offset % p_align"
            {
              v5 = "LxpElfInfoParse: LocalProgramHeader.VirtualAddress\n";
              v6 = 554;
              goto LABEL_5;
            }
            if ( v46 )
            {
              if ( v46 != v54 )    // Bug here! WSL1 assumes all `p_align` member in `PT_LOAD` program headers must be the same value, which is not correct. 
              {
                v5 = "LxpElfInfoParse: LoadHeaderAlignment\n";
                v6 = 567;
                goto LABEL_5;
              }
            }
            else
            {
              v46 = v54;
            }
...
}

LxpElfInfoParse function (RVA 0x1C004DC60) at lxcore.sys parses ELF file. See pesudo code above, 0x464C457F is the ELF magic number ("\x7fELF"), and v23 is p_type member of Elf64_Phdr. v23 == 1 means PT_LOAD (see here), and v54 is p_align member of Elf64_Phdr.
v46 is initialized to 0, and when it firstly meets v54, it will be set to its value. When v46 secondly meets v54, it checks v54 should equals to the old v46 value, which causes this issue.

So, for example, after patching all the p_align value from 0x1000 to 0x2000 (offset 0xE1, 0x119 and 0x151 of gzip 1.10-4ubuntu4), the new binary can also works well.

@Zenderable
Copy link

Zenderable commented Apr 23, 2022

Same issue here (Ubuntu 22.04 & WSL1). I can't start VS Code Server due this issue:

Installing VS Code Server for x64 (dfd34e8260c270da74b5c2d86d61aee4b6d56977)
Downloading: 100%
/usr/bin/gzip: 1: ELF����: Permission denied
/usr/bin/gzip: 3: ���: Permission denied
/usr/bin/gzip: 4: Syntax error: "(" unexpected
tar: Child returned status 2
tar: Error is not recoverable: exiting now

tar is unable to read /home/stumski/.vscode-server/bin/dfd34e8260c270da74b5c2d86d61aee4b6d56977-1650739878.tar.gz. Either the file is corrupt or tar has an issue.
There's a known WSL issue with tar on Ubuntu 19.10.
See workaround in https://github.com/microsoft/vscode-remote-release/issues/1856.
Reload the window to initiate a new server download.

stumski@C-H50K6G3:~$ gzip
-bash: /usr/bin/gzip: cannot execute binary file: Exec format error

Older version works well:

sudo dpkg -i ./gzip_1.10-4ubuntu1_amd64.deb
stumski@C-H50K6G3:~$ sudo dpkg -i ./gzip_1.10-4ubuntu1_amd64.deb
dpkg: warning: downgrading gzip from 1.10-4ubuntu4 to 1.10-4ubuntu1
(Reading database ... 33879 files and directories currently installed.)
Preparing to unpack ./gzip_1.10-4ubuntu1_amd64.deb ...
Unpacking gzip (1.10-4ubuntu1) over (1.10-4ubuntu4) ...
Setting up gzip (1.10-4ubuntu1) ...
Processing triggers for install-info (6.8-4build1) ...
Processing triggers for man-db (2.10.2-1) ...

stumski@C-H50K6G3:~$ sudo apt-mark hold gzip
gzip set on hold.

stumski@C-H50K6G3:~$ gzip
gzip: compressed data not written to a terminal. Use -f to force compression.
For help, type: gzip -h
stumski@C-H50K6G3:~$ code
Updating VS Code Server to version dfd34e8260c270da74b5c2d86d61aee4b6d56977
Removing previous installation...
Installing VS Code Server for x64 (dfd34e8260c270da74b5c2d86d61aee4b6d56977)
Downloading: 100%
Unpacking: 100%
Unpacked 2341 files and folders to /home/stumski/.vscode-server/bin/dfd34e8260c270da74b5c2d86d61aee4b6d56977.
stumski@C-H50K6G3:~$

@dreamlayers
Copy link

So, for example, after patching all the p_align value from 0x1000 to 0x2000 (offset 0xE1, 0x119 and 0x151 of gzip 1.10-4ubuntu4), the new binary can also works well.

Actually those were all 0x1000 already. In gzip 1.10-4ubuntu4 I only had to change the value at offset 0x189 using
echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

@LostInBrittany
Copy link

LostInBrittany commented Apr 27, 2022

It also happens in WSL2, I have just found it (unable to start VScode because of it)

Patch by @dreamlayers worked beautifully, thanks!

@Zenderable
Copy link

Zenderable commented Apr 27, 2022

@LostInBrittany Are you absolutely certain that your distribution is running under WSL2? You can list all distros with wsl -l -v. I ask, because when switching to WSL2 it didn't happen to me.
I tried patch by @dreamlayers on newest gzip and it's working as it should!

@LostInBrittany
Copy link

@Zenderable OMG, you're right, my bad... I have two Windows 11 computers, both with Windows Insiders, both with WSL, and I was sure both of them used the same WSL version... And not, this one has WSL 1, and the other WSL 2 (and it hasn't the problem, you're right). Sorry about that!

@landall
Copy link

landall commented May 2, 2022

I trigger the same issue. WSL 2 is ok, WSL 1 is wrong.

@stong
Copy link

stong commented May 18, 2022

By reversing lxcore.sys, the real reason of this bug is that WSL1 assumes all p_align member in PT_LOAD program headers must be the same value, which is not correct. (See elf(5) — Linux manual page, there is not such assumption for p_align)
...

IDA Pro and Hexrays to the rescue again!

@Uzume
Copy link

Uzume commented May 19, 2022

@benhillis It seems like your ELF loader still has some serious issues.

For anyone else trying to run Ubuntu 22.04 LTS in WSL (especially WSL1), such will also likely want the workaround for #7054 too.

@wangqr
Copy link

wangqr commented May 22, 2022

I came here from #8151, nodejs from Arch could not run on WSL1.

In my case, node also has different p_align values in its program headers, but this only happens if nodejs is built after 2022/02/14, when Archlinux upgraded glibc from 2.33 to 2.35. After some git bisect, I find out that GNU ld changed p_align in binutils 2.38, or more specifically binutils-gdb@74e315dbfe5. Previously, if a section requires alignment higher than max-page-size, it won't affect p_align in corresponding segment. After this commit, if a section requires alignment higher than max-page-size, the required alignment will be set as p_align of this and later segments. In nodejs's case, it has a lpstub section that is aligned to 2MiB, which caused several LOAD segments having p_align=0x200000.

Here's the python script I used to patch p_align values:

from elftools.elf.elffile import ELFFile  # pip install pyelftools

target_p_align = 0x1000
in_file = '/usr/bin/node'
out_file = '/usr/local/bin/node'

with open(in_file, 'rb') as fp:
    bdata = bytearray(fp.read())
    elf = ELFFile(fp)
    header_size = elf.structs.Elf_Phdr.sizeof()
    for i in range(elf.num_segments()):
        header = elf.get_segment(i).header
        if header.p_type == 'PT_LOAD' and header.p_align != target_p_align:
            print(f'changing alignment of program header {i} from {header.p_align} to {target_p_align}')
            header.p_align = target_p_align
            header_offset = elf._segment_offset(i)
            bdata[header_offset:header_offset+header_size] = elf.structs.Elf_Phdr.build(header)
with open(out_file, 'wb') as fp:
    fp.write(bdata)

@wangqr wangqr mentioned this issue May 23, 2022
2 tasks
@sherlockchou86
Copy link

So, for example, after patching all the p_align value from 0x1000 to 0x2000 (offset 0xE1, 0x119 and 0x151 of gzip 1.10-4ubuntu4), the new binary can also works well.

Actually those were all 0x1000 already. In gzip 1.10-4ubuntu4 I only had to change the value at offset 0x189 using echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

work!

@hane-junjun
Copy link

hane-junjun commented May 31, 2022

So, for example, after patching all the p_align value from 0x1000 to 0x2000 (offset 0xE1, 0x119 and 0x151 of gzip 1.10-4ubuntu4), the new binary can also works well.

Actually those were all 0x1000 already. In gzip 1.10-4ubuntu4 I only had to change the value at offset 0x189 using echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

work!

work!

 hanejun ~  wsl --list --verbose
NAME STATE VERSION

  • u22_w1 Running 1

 hanejun ~  wsl
hanejun@kenbishi:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy

@ReyasAli
Copy link

ReyasAli commented Jun 7, 2022

So, for example, after patching all the p_align value from 0x1000 to 0x2000 (offset 0xE1, 0x119 and 0x151 of gzip 1.10-4ubuntu4), the new binary can also works well.

Actually those were all 0x1000 already. In gzip 1.10-4ubuntu4 I only had to change the value at offset 0x189 using echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

Thank you man
It saved my time

@the-moog
Copy link

Here is a tool that makes use of the code snippet from @wangqr
GIST

@hbprotoss
Copy link

So, for example, after patching all the p_align value from 0x1000 to 0x2000 (offset 0xE1, 0x119 and 0x151 of gzip 1.10-4ubuntu4), the new binary can also works well.

Actually those were all 0x1000 already. In gzip 1.10-4ubuntu4 I only had to change the value at offset 0x189 using echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

It's magic

@rattfieldnz
Copy link

So, for example, after patching all the p_align value from 0x1000 to 0x2000 (offset 0xE1, 0x119 and 0x151 of gzip 1.10-4ubuntu4), the new binary can also works well.

Actually those were all 0x1000 already. In gzip 1.10-4ubuntu4 I only had to change the value at offset 0x189 using echo -en '\x10' | sudo dd of=/usr/bin/gzip count=1 bs=1 conv=notrunc seek=$((0x189))

Can confirm this works for me as well.

My build info:

OS Name: Microsoft Windows 10 Home

Version: 10.0.19044 Build 19044

System Type: x64-based PC

WSL Version: 2

Linux Distro: Ubuntu 22.04 (Jammy)

andreineculau added a commit to ysoftwareab/yplatform that referenced this issue Jul 18, 2022
andreineculau added a commit to ysoftwareab/yplatform that referenced this issue Jul 18, 2022
andreineculau added a commit to ysoftwareab/yplatform that referenced this issue Jul 18, 2022
@seanthegeek
Copy link

FWIW, gzip 1.10-4+deb11u1 on Debian Bullseye and 1.12-1 on Debian Bookworm do not have this issue.

@NotTheDr01ds
Copy link

NotTheDr01ds commented Sep 13, 2022

Also a workaround without actually patching the binary:

printf '#!/bin/sh\nexec /lib64/ld-linux-x86-64.so.2 /usr/bin/gzip "$@"' | sudo tee /usr/local/bin/gzip
sudo chmod +x /usr/local/bin/gzip

From this comment on the related Node issue.

@thisconnected
Copy link

has anyone bumped it to windows division? (I havent used windows in ages so i dont really know how) This really ought to be fixed as their linker is faulty and in future will continue to cause problems with newer builds

@gavenkoa
Copy link

Microsoft thinks WSL 1 is dead )) Their evangelists use WSL 2 exclusively.

@NotTheDr01ds
Copy link

NotTheDr01ds commented Sep 19, 2022

A new gzip package is available in the jammy-proposed repo that appears to fix the issue (well, at least revert the optimizations that cause WSL1 to choke). If you have the ability, please follow the instructions in the Launchpad report to test and report your findings.

My understanding is that only one person needs to confirm, but I'd love more eyes on it than just mine.

@FloxD
Copy link

FloxD commented Nov 9, 2022

my workaround was to install a newer gzip version manually

i opened up http://archive.ubuntu.com/ubuntu/pool/main/g/gzip/ and copied the link to gzip_1.12-1ubuntu1_amd64.deb
then downloaded the file via curl

curl -fsSL -o gzip_1.12-1ubuntu1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gzip/gzip_1.12-1ubuntu1_amd64.deb

and installed it

sudo dpkg -i gzip_1.12-1ubuntu1_amd64.deb

@dreamlayers
Copy link

In WSL1 Ubuntu 22.04.1 LTS in Windows 10 22H2 (OS Build 19045.2251), new gzip 1.10-4ubuntu4.1 works fine. I cancelled the apt hold I had and simply allowed it to install automatically.

balabit-sync pushed a commit to balabit-deps/balabit-os-9-gzip that referenced this issue Nov 15, 2022
gzip (1.10-4ubuntu4.1) jammy; urgency=medium

  * Cherry-pick upstream patch to use more portable alignment to resolve
    failure to execute on
    WSL1. microsoft/WSL#8219 LP: #1966849

gzip (1.10-4ubuntu4) jammy; urgency=medium

  * SECURITY UPDATE: arbitrary file override with crafted file names
    - debian/patches/CVE-2022-1271-1.patch: avoid exploit via multi-newline
      file names in zgrep.in.
    - debian/patches/CVE-2022-1271-2.patch: add test in tests/Makefile.am,
      tests/zgrep-abuse.
    - debian/patches/CVE-2022-1271-3.patch: port to POSIX sed in zgrep.in.
    - debian/patches/CVE-2022-1271-4.patch: optimize out a grep in
      gzexe.in.
    - debian/patches/CVE-2022-1271-5.patch: use C locale more often in
      gzexe.in, sample/zfile, zdiff.in, zgrep.in, znew.in.
    - debian/patches/CVE-2022-1271-6.patch: fix "binary file matches"
      mislabeling in tests/Makefile.am, tests/zgrep-binary, zgrep.in.
    - debian/rules: fix permissions on new test scripts.
    - CVE-2022-1271

gzip (1.10-4ubuntu3) jammy; urgency=medium

  * No-change rebuild for ppc64el baseline bump.

gzip (1.10-4ubuntu2) impish; urgency=medium

  * No-change rebuild to build packages with zstd compression.

gzip (1.10-4ubuntu1) impish; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - Cherrypick upstream patches for optimizied s390x zlib compression
      and enable it
    - Applying patch from upstream to fix a segfault caused by passing
      multiple files larger than 5kb to a gzip command while zlib
      acceleration is enabled
    - Enable DFLTCC optimisations on s390x by default. LP: #1884514

gzip (1.10-4) sid; urgency=medium

  * skip out of range timestamp test on mips64el (closes: #983706)

gzip (1.10-3) sid; urgency=medium

  * Many thanks to Bdale Garbee for a quarter of a century worth of
    contributions to this package.
  * new maintainer (closes: #976304)
  * link static ssp library when building with mingw (closes: #983373)
  * gzexe: fix count of lines to skip (closes: #958425)

gzip (1.10-2ubuntu3) hirsute; urgency=medium

  * Enable DFLTCC optimisations on s390x by default. LP: #1884514

gzip (1.10-2ubuntu2) hirsute; urgency=medium

  [ William 'jawn-smith' Wilson ]
  * Applying patch from upstream to fix a segfault caused by passing
    multiple files larger than 5kb to a gzip command while zlib
    acceleration is enabled (LP: #1901528)

gzip (1.10-2ubuntu1) groovy; urgency=medium

  * Merge from Debian unstable
    - Remaining changes:
      * Cherrypick upstream patches for optimizied s390x zlib compression
        and enable it
    - Dropped changes:
      * Build-depend on binutils (>= 2.33.1-6ubuntu1)
      * Pass -fstack-protector to mingw build to fix FTBFS

gzip (1.10-2) unstable; urgency=medium

  * -DUNALIGNED_OK was only meant to be enabled on amd64, closes: #954283

gzip (1.10-1) unstable; urgency=medium

  * new upstream version, closes: #925554
  * explicitly link -lssp when building with mingw, closes: #951951
  * apply suggestions from lintian and Nicolas Boulenguez, closes: #881895

gzip (1.10-0ubuntu4) focal; urgency=high

  * Rebuild with binutils 2.33.1-6ubuntu1 (LP: #1843479)
    - Build-depend on binutils (>= 2.33.1-6ubuntu1)
  * Pass -fstack-protector to mingw build to fix FTBFS

gzip (1.10-0ubuntu3) eoan; urgency=medium

  * Fix typpo in enabling optimized s390x zlib compression. LP: #1841052

gzip (1.10-0ubuntu2) eoan; urgency=medium

  * Cherrypick gnu debbugs fixes for optimizied s390x zlib
    compression. LP: #1839123

gzip (1.10-0ubuntu1) eoan; urgency=medium

  * New upstream release
  * Cherrypick upstream patches for optimizied s390x zlib compression and
    enable it LP: #1825350

gzip (1.9-3) unstable; urgency=medium

  * move canonical packaging repo to salsa.debian.org
  * merge two existing NMUs
  * deliver NEWS file, closes: #908507

gzip (1.9-2.2) unstable; urgency=medium

  * Non-maintainer upload.

  [ Niels Thykier ]
  * Cherry-pick patch from gnulib upstream to make gzip build
    with glibc/2.28.  (Closes: #915150)
  * Declare that gzip does not need (fake)root for building the
    debs.
  * Add patch to remove incorrect -Wabi as -Wabi should always
    take a parameter (e.g. -Wabi=11) and it fails with -Werror=abi.
  * Add a patch to remove -Werror(=...) as it trips on some gnulib
    code.
  * Include autopkgtest based on the version by Steve Langasek for
    Ubuntu.
  * Remove fallback code to use dh_clean -k.
  * Remove usage of deprecated -s parameter for debhelper commands
    (replacing them with "-a").
  * Add a Homepage field.  Thanks to Jakub Wilk for the suggestion.
    (Closes: #888619)
  * Remove empty lintian override directory.

  [ Andreas Henriksson ]
  * Set GREP=grep during configure, otherwise zgrep embeds the full
    path. (Closes: #914907)

gzip (1.9-2.1) unstable; urgency=medium

  * Non-maintainer upload.
  * Disable usage of assembler code (Closes: #890279)
    - this affects i386, m68k and ia64 (and gets rid of textrels
      on atleast i386, thanks to Andreas Pommer for testing).
    - fedora claims gcc generates more optimized code anyway.
    - supposedly this also fixes gzip generating different results
      on ia64, thanks to Jason Duerstock for pointing it out.
      (Closes: #688958)

gzip (1.9-2) unstable; urgency=medium

  * move to upstream's less-ugly fix for mingw compilation failure

gzip (1.9-1) unstable; urgency=medium

  * new upstream version, closes: #855839
  * patch from Ben Wong that fixes zgrep failure on filenames starting with
    'binary' due to missing dashes in an option detection pattern match,
    closes: #854878
  * update to policy 4.1.5, including use of https in vcs entries
  * patch gzip.c to work around mingw compiliation failure
  * use optional priority for gzip-win32 now that extra is deprecated
  * use architecture.mk instead of setting ARCH vars by hand in rules
  * update build dependencies for debhelper compat level 11

gzip (1.8-1) unstable; urgency=low

  * new upstream version, closes: #855839

gzip (1.6-5) unstable; urgency=low

  * stop including date in manual to enable reproducible builds,
    closes: #794011

gzip (1.6-4) unstable; urgency=low

  * fix typo in man page, closes: #738546
  * specify /bin/sh as shell for wrapper scripts, closes: #762915

gzip (1.6-3) unstable; urgency=low

  * add a comment to the lintian overrides explaining them
  * updated rsyncable patch from Alexander Inyukhin, closesL #708423
  * never include dir.gz in package, closes: #720917

gzip (1.6-2) unstable; urgency=low

  * patch to update included gnulib for mingw-w64 changes, closes: #713950

gzip (1.6-1) unstable; urgency=low

  * new upstream version, closes: #704689, #690583, #521432, #96195, #693463
  * merge diff from 1.5-1.1 NMU by Thorsten Glaser
  * patch for zgrep man page from Regid Ichira, closes: #687123
  * restore rsyncable docs to man page, closes: #688305

gzip (1.5-1.1) unstable; urgency=low

  * Non-maintainer upload with permission of maintainer.
  * Clean up the debian/rules file to fix FTBFS caused by
    inclusion of build-indep on binary-arch target.

gzip (1.5-1) unstable; urgency=low

  * new upstream version, with updated gnulib that closes: #669434
  * patch to restore zgrep -h from Pär-Ola Nilsson, closes: #658734
  * patch to fix pack reference in gzip man page from Stéphane Aulery,
    closes: #308522
  * patch to add --rsyncable doc to info page from Jörgen Grahn,
    closes: #637626
  * patch to improve zdiff doc from Stéphane Aulery, closes: #269612
  * patches to fix RFC URLs from Stéphane Aulery, closes: #636182

gzip (1.4-5) unstable; urgency=low

  * patch from upstream to address determinism issue, closes: #647522

gzip (1.4-4) unstable; urgency=low

  * enable hardening build flags, closes: #664499

gzip (1.4-3) unstable; urgency=low

  * patch from upstream for sys_stat.in.h to fix mingw32 builds,
    closes: #653960

gzip (1.4-2) unstable; urgency=low

  * patch to use DEB_HOST_ARCH in rules, closes: #644785
  * fix missing stamp creating in rules file causing extra build cycle,
    closes: #648555

gzip (1.4-1) unstable; urgency=low

  * new upstream version, closes: #627121, #633927
  * add Vcs entries to control file
  * patch zless LESSOPEN definition to allow handling of gunzip data on STDIN,
    closes: #248302
  * Build using mingw-w64 instead of mingw32, closes: #623428
  * update to current policy, source package formats, etc

gzip (1.3.12-9) unstable; urgency=high

  * fix applied for CVE-2010-0001 which identified an integer underflow when
    decompressing files that are compressed using the LZW algorithm. This
    could lead to the execution of arbitrary code when trying to decompress
    a crafted LZW compressed gzip archive.
  * switch to using dh_lintian for override delivery

gzip (1.3.12-8) unstable; urgency=low

  * Add Carl Worth as an uploader.
  * Fix "-f -" to work with zgrep, closes: #168606
  * Avoid creating undersized hufts table, closes: #507263

gzip (1.3.12-7) unstable; urgency=low

  * improve package descriptions, remove ancient package relationship spec
    in control file, closes: #484547

gzip (1.3.12-6) unstable; urgency=low

  * strip the win32 gzip.exe binary during install, closes: #464455
  * patch from Reuben Thomas for the zless.1 man page with pointers to
    lessfile and lesspipe, which are a better solution than zless in most
    cases... closes: #46787, #51162
  * fix FTBFS when using gcc-4.3, closes: #476031
  * remove the preinst since the --assert-support-predepends check should
    no longer be necessary

gzip (1.3.12-5) unstable; urgency=low

  * patch for zgrep.in from Daniel Kobras, closes: #434429
  * patch from upstream to fix compilation with mingw32, and patch from
    Robert Millan to build a win32 executable if mingw32 is available, all
    to fix a preseeding problem in the win32-loader for Debian Installer.
    closes: #457867

gzip (1.3.12-4) unstable; urgency=low

  * incorporate diffs from NMUs, closes: #434275, #433845, #438675
  * define UNALIGNED_OK when building for amd64, closes: #386356

gzip (1.3.12-3.2) unstable; urgency=low

  * Non-maintainer upload.
  * Stop zdiff from dropping cmp's output. Patch thanks to Jorg-Volker Peetz
    (Closes: Bug#434275)

gzip (1.3.12-3.1) unstable; urgency=medium

  * Non-maintainer upload.
  * Rename futimens to gz_futimens, since glibc now defines an futimens
    function with a different prototype.  Closes: #433845.
  * Urgency medium for the RC bug fix.

gzip (1.3.12-3) unstable; urgency=low

  * fix bindir so gunzip, et al, work again, closes: #429462

gzip (1.3.12-2) unstable; urgency=low

  * fix typo in gzip fprintf, closes: #426965
  * revert my zgrep.in patch since upstream handles alternates differently now

gzip (1.3.12-1) unstable; urgency=low

  * new upstream version, closes: #177942, #225864, #362786, #366660, #367400,
    #383358, #402042, #404099, #404114, #419895
  * fix delivery of upstream ChangeLog, closes: #404062

gzip (1.3.9-2) unstable; urgency=low

  * change direntry ordering in gzip.texi to work around bug in install-info,
    closes: #404048

gzip (1.3.9-1) unstable; urgency=low

  * new upstream version, closes: #366660, #403308
  * clean up a few gratuitous differences from new upstream, leaving
    only the rsyncable patch and tweaks like zmore always using more
  * fix spelling error in documentation, closes: #395450
  * upstream patch for regression uncompressing null input, closes: #403970

gzip (1.3.5-15) unstable; urgency=high

  * security update, covering the following alerts:
    CVE-2006-4334 CVE-2006-4335 CVE-2006-4336 CVE-2006-4337 CVE-2006-4338

gzip (1.3.5-14) unstable; urgency=medium

  * update section to match override
  * patch from Matthew Chapman to avoid deleting input file before we're
    sure the output file has been written without errors, closes: #366660
  * patch from Reuben Thomas to fix zgrep return code,
    closes: #292896, #192891, #190442
  * enable gzexe compressed files to work on systems where tempfile is not
    available while retaining preference for tempfile, closes: #334540

gzip (1.3.5-13) unstable; urgency=low

  * patch from Reuben Thomas fixes problem passing zgrep filenames starting
    with dashes, closes: #342501
  * fix a spelling error in gzip man page, closes: #356011
  * document the fact that zless doesn't work with stdin,
    closes: #320226, #345036

gzip (1.3.5-12) unstable; urgency=low

  * merge patch from Matt Zimmerman for futex hang due to improper signal
    handling, closes: #310053, #315612
  * merge patch to add --rsyncable to the man page, closes: #289616, #295721
  * don't return failing result code on harmless warning, closes: #169669

gzip (1.3.5-11) unstable; urgency=low

  * patch from Peter Samuelson for bashism in zgrep,
    closes: #314342, #314211, #312380, #310329

gzip (1.3.5-10) unstable; urgency=medium

  * remove PAGER reference from zmore.1, closes: #263792
  * patch to improve zgrep argument sanitizing (CAN-2005-0758),
    closes: #308379
  * patch isolated by Petter Reinholdtsen for CAN-2005-0988, closes: #303927
  * patch for dir traversal bug (CAN-2005-1228), closes: #305255
  * up the priority a click because of the security fixes
  * patch to support cross building, closes: #283730

gzip (1.3.5-9) unstable; urgency=low

  * eliminate the autoconf and automake build dependencies, since they are
    no longer needed, closes: #250766
  * improve temp file usage in gzexe, closes: #257314, #259043
  * have zmore use 'more' instead of honoring $PAGER, to avoid violating
    the principle of least astonishment, closes: #234212
  * fix zgrep choke on filenames including a pipe character, closes: #216211
  * incorporate watch file, closes: #248722
  * suggest less, since we provide zless, closes: #217925
  * use signames instead of signumbers for trap calls, closes: #259284

gzip (1.3.5-8) unstable; urgency=low

  * run autoreconf -i to address problem reported with dir.old.gz being
    included on rebuilds, closes: #249519
  * change automake build dependency from automake1.7 to automaken
  * add lintian overrides to squelch the hardlink warnings
  * fix typo in inflate.c comments, closes: #201881

gzip (1.3.5-7) unstable; urgency=low

  * patch from David Mosberger to incorporate work done by Sverre Jarp on
    an ia64 version of match.c content.

gzip (1.3.5-6) unstable; urgency=medium

  * patch for insecure temp file usage in znew, closes: #193375

gzip (1.3.5-5) unstable; urgency=low

  * apply patch from Anthony Towns that fixes seg faults on alpha during
    build of Xfree86 at the expense of slightly decreasing the effectiveness
    of the deflate implementation.  closes: #184057, #187417

gzip (1.3.5-4) unstable; urgency=low

  * merge patch from Rusty Russell that adds --rsyncable option to gzip.
    This modifies the output stream to allow rsync to transfer updated .gz
    files much more effectively.  The resulting .gz files should be compatible
    with the existing gunzip.  The plan is that if this works out well for
    Debian, the functionality will be included in a future upstream gzip
    release.  Closes: #116183, #118118, #134741

gzip (1.3.5-3) unstable; urgency=low

  * upload a fresh version so m68k, et al, will rebuild, closes: #167790

gzip (1.3.5-2) unstable; urgency=low

  * fix gzexe.in again as per what I did for 1.3.2-3 that accidentally got
    lost when I merged 1.3.5 from upstream... sigh.  Closes: #167150
  * hack on gzip.texi a little harder to squelch warning at install time from
    Debian's install-info, closes: #164106

gzip (1.3.5-1) unstable; urgency=low

  * new upstream version
  * fixes a bug in the incorrect-suffix diagnostic, which can lead to a
    core dump, closes: #152579
  * removes dangling output symlinks properly, closes: #144759
  * zless no longer thinks it is zmore in usage message, closes: #121810
  * zless replaced with a much simpler script, closes: #124097
  * uses shell pattern matching instead of 'expr', closes: #123295
  * man page suggests how to use gunzip on zip files, closes: #146019
  * uses "trap -" to avoid bashism, closes: #140972, #157111
  * accepts __i386 and __i386__ as synonyms for i386, closes: #152694
  * fixes printing values greater than 10 * 2**32 bytes, closes: #141189
  * includes fix for zforce needing -v, closes: #123294
  * hack gzip.texi so that the Debian install-info doesn't choke on it (grrr),
    and add texinfo as a build dependency
  * eliminate things hard-coded in postinst and prerm now handled by debhelper

gzip (1.3.2-3) unstable; urgency=low

  * modify gzexe.in to hard-code /bin/gzip instead of trying to use BINDIR
    which yields /usr/bin/gzip.  Don't use PATH since we have no idea what it
    might be when the gzexe'd executable gets run.  Closes: #119641

gzip (1.3.2-2) unstable; urgency=low

  * fix silly mistake made when moving man pages from hard to soft links, so
    man pages for zegrep, zfgrep, and uncompress work again, closes: #118325

gzip (1.3.2-1) unstable; urgency=low

  * new upstream release, incorporating my diffs to 1.3.1

gzip (1.3.1-2) unstable; urgency=low

  * add build dependencies on autoconf and automake
  * fix infodir spec so we install in the build tree, not the system directory

gzip (1.3.1-1) unstable; urgency=low

  * new upstream version!  From alpha.gnu.org, on the explicit advice of the
    current upstream maintainers, who are working with Debian to prepare a new
    stable release that addresses many of the open issues in our BTS.
    .
    large file support handled in configure, closes: #108612, #83061, #113000
    it appears the subtle problem with concatenation is fixed, closes: #114591
    various segfault problems appear fixed, closes: #46312
    gzip -r issues fixed, closes: #53645, #106186
    problem with --no-filename option fixed, closes: #59067
    zgrep -r disallowed - "I did not use the patch as it was not a complete
    . fix for the problem and I thought it would cause more problems than
    . it would cure.  Instead, I simply disallowed zgrep -r", closes: #81288
    error message reworded, closes: #76238
    compression factor output fixed, closes: #80362
    zgrep -H fixed, closes: #84371
    permission issue when forced to compress linked file fixed, closes: #88918
    manpage hardlinks fixed, closes: #94733
    gzip --help now goes to stdout, closes: #97020
    zless no longer runs less if file doesn't exist, closes: #109097
    problem with -best fixed, closes: #17650
    zgrep now understands --, closes: #28475
    file size output by gzip fixed for large files, closes: #40721
  * fix location referenced for GPL on Debian systems, closes: #112095
  * move install-info remove call from from postrm to prerm

gzip (1.2.4-33) unstable; urgency=low

  * update to current policy

gzip (1.2.4-32) unstable; urgency=low

  * update prototype for and definition of basename function for compatibility
    with glibc2.0, still in use on m68k.  Closes: #45058

gzip (1.2.4-31) unstable; urgency=medium

  * fix problems I induced while merging the upstream patch in the last upload,
    most notably omitting zless from the package.
    Closes: #44883, #44885, #44890, #44882, #44887, #44895, #44896

gzip (1.2.4-30) unstable; urgency=low

  * upstream patch, closes: #28872
      1998-11-18  Paul Eggert  <eggert@twinsun.com>
      gzip.c (get_method): Don't complain about trailing zeros at
      the end of a gzipped file, as they're commonly appended to fill
      out a block (e.g. by GNU tar).
  * update to FHS compliance

gzip (1.2.4-29) unstable; urgency=low

  * apply patch from Vincent Renardias that improves behavior when trying to
    decompress a corrupted .gz file.  Closes 7472, 16385

gzip (1.2.4-28) frozen unstable; urgency=medium

  * patch zforce to make it work at all, closes 22760
  * patch to fix decompression of concatenated gzip files, closes 30537

gzip (1.2.4-27) frozen unstable; urgency=low

  * patch from Jean-loup (upstream maintainer) for zgrep.in to fix the
    problems with -A and -B successfully passing to grep.  Closes 21209.

gzip (1.2.4-26) frozen unstable; urgency=low

  * fix FSF address in copyright file, lintian now reports no errors
  * minor tweak to Makefile to fix warnings during dh_installmanpages run

gzip (1.2.4-25) frozen unstable; urgency=low

  * update znew.in and zdiff.in to do save tempfile handling, closes 19794

gzip (1.2.4-24) unstable; urgency=low

  * minor fix for complaints about short files, closes 19159

gzip (1.2.4-23) unstable; urgency=high

  * respond to security advisory from Alan Cox via Christian Hudon, fixes
    an obscure possibility to get gzip to execute code

gzip (1.2.4-22) unstable; urgency=high

  * gzexe modified to use tempfile in response to security advisory

gzip (1.2.4-21) unstable; urgency=low

  * fix from the upstream maintainer for voluminous "Broken Pipe" messages
    when using 'zgrep -l' or equivalent.  Closes bug 15178.

gzip (1.2.4-20) unstable; urgency=low

  * freshen rules file to match current debhelper
  * improve handling of undocumented executables.  Closes bug 13578.

gzip (1.2.4-19) unstable; urgency=low

  * change dependency to Pre-Depends, to keep dpkg from getting hosed during
    libc6 upgrades.  Closes 15091.
  * switch from debmake to debhelper.  In the process, closes 15412.

gzip (1.2.4-18) unstable; urgency=low

  * don't install INSTALL in the doc directory, closes bug 13224.

gzip (1.2.4-17) unstable; urgency=low

  * fix distribution problem in changelog file

gzip (1.2.4-16) stable frozen unstable; urgency=low

  * libc6
  * tweaks to rules file to install Changelog, closes bug 12488

gzip (1.2.4-15) stable frozen unstable; urgency=low

  * fix minor security issue - race condition reported on bugtraq list
  * rework debian/rules to build with debugging then strip

gzip (1.2.4-14) stable frozen unstable; urgency=medium

  * The -13 upload was built against a libc5 too new for 'stable'.

gzip (1.2.4-13) stable frozen unstable; urgency=medium

  * Fix missing "essential" flag on package, lost during standards update.
  * Push this version back into stable to solve the 'compress' link problem.

gzip (1.2.4-12) unstable; urgency=low

  * New packag format.
@ZupoLlask
Copy link

In WSL1 Ubuntu 22.04.1 LTS in Windows 10 22H2 (OS Build 19045.2251), new gzip 1.10-4ubuntu4.1 works fine. I cancelled the apt hold I had and simply allowed it to install automatically.

I can also confirm this.

@emmanuelattia
Copy link

It still doesn't work when we install directly the minifs https://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04-base-amd64.tar.gz under WSL1

Workaround is to install the gzip package, but it would be great to have the one in the minifs already fixed.

@osalbahr
Copy link

osalbahr commented Jul 6, 2023

Should the fixed-in-wsl2 label be added?

@mohag
Copy link

mohag commented Jul 12, 2023

It still doesn't work when we install directly the minifs https://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04-base-amd64.tar.gz under WSL1

Workaround is to install the gzip package, but it would be great to have the one in the minifs already fixed.

WSL should be able to run all valid binaries, changing the binaries to work around the bug in WSL doesn't fix WSL...

@kotenok2000
Copy link

Is it possible to update lxcore.sys to fix the bug?

@maurogarioni
Copy link

please any shell works under windows11?

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

No branches or pull requests