[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Issue of using "dpkg" for newer ".deb" files
From: Ken CJ Chou <kenchou0731 () gmail ! com>
Date: 2019-10-12 17:35:29
Message-ID: CAGLgBv=u7RZWWhc21xjGLTv-yubfQGpgd37vJix=wfgYm_2myA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
It works! Thank you very much.
Ken
Denys Vlasenko <vda.linux@googlemail.com> =E6=96=BC 2019=E5=B9=B410=E6=9C=
=8811=E6=97=A5 =E9=80=B1=E4=BA=94 =E4=B8=8B=E5=8D=888:14=E5=AF=AB=E9=81=93=
=EF=BC=9A
> On Sun, Sep 29, 2019 at 6:38 AM Ken CJ Chou <kenchou0731@gmail.com> wrote=
:
> >
> >
> > Hello,
> >
> > I'm using the latest version of busybox (1.31.0).
> > I found an issue when using "dpkg" and "dpkg-deb" in busybox.
> > When I performed some task to get the control info of a ".deb" file.
> > The output showed a "dpkg-deb: corrupted data" message.
> >
> > e.g.
> > ```
> > # dpkg-deb -f <some_deb_file>
> > Package: <some_package>
> > ...
> > dpkg-deb: corrupted data
> > ```
> >
> > I looked into the source code.
> > In file "archival/libarchive/decompress_unxz.c" line 97, here busybox
> tried to decompress another xz stream when it found that the input stream
> isn't ended.
> >
> > So the issue happens on newer Debian package files.
> > Newer Debian package files format is an "ar" archive of 3 files
> including "debian-binary", "control.tar.xz", "data.tar.xz" in orders.
> > When performing tasks on the Debian package file, the archive handler
> open the ".deb" file as the input stream.
> > When busybox complete reading the section of "control.tar.xz", it
> automatically tried to decompress another xz stream because there is stil=
l
> the section of "data.tar.xz" in the input stream.
> > In this situation, busybox will read the label of "ar" archive for
> "data.tar.xz" section. Then it fails at checking xz's header magic. And
> finally a "corrupted data" error message is printed.
>
> Good analysis.
>
> I added a work-around, please try current git.
>
[Attachment #5 (text/html)]
<div dir="ltr">It works! Thank you very \
much.<br><div><br></div><div>Ken</div></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">Denys Vlasenko <<a \
href="mailto:vda.linux@googlemail.com">vda.linux@googlemail.com</a>> 於 \
2019年10月11日 週五 下午8:14寫道:<br></div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">On Sun, Sep 29, 2019 at 6:38 AM Ken CJ Chou <<a \
href="mailto:kenchou0731@gmail.com" target="_blank">kenchou0731@gmail.com</a>> \
wrote:<br> ><br>
><br>
> Hello,<br>
><br>
> I'm using the latest version of busybox (1.31.0).<br>
> I found an issue when using "dpkg" and "dpkg-deb" in \
busybox.<br> > When I performed some task to get the control info of a \
".deb" file.<br> > The output showed a "dpkg-deb: corrupted \
data" message.<br> ><br>
> e.g.<br>
> ```<br>
> # dpkg-deb -f <some_deb_file><br>
> Package: <some_package><br>
> ...<br>
> dpkg-deb: corrupted data<br>
> ```<br>
><br>
> I looked into the source code.<br>
> In file "archival/libarchive/decompress_unxz.c" line 97, here busybox \
tried to decompress another xz stream when it found that the input stream isn't \
ended.<br> ><br>
> So the issue happens on newer Debian package files.<br>
> Newer Debian package files format is an "ar" archive of 3 files \
including "debian-binary", "control.tar.xz", \
"data.tar.xz" in orders.<br> > When performing tasks on the Debian \
package file, the archive handler open the ".deb" file as the input \
stream.<br> > When busybox complete reading the section of \
"control.tar.xz", it automatically tried to decompress another xz stream \
because there is still the section of "data.tar.xz" in the input \
stream.<br> > In this situation, busybox will read the label of "ar" \
archive for "data.tar.xz" section. Then it fails at checking xz's \
header magic. And finally a "corrupted data" error message is printed.<br> \
<br> Good analysis.<br>
<br>
I added a work-around, please try current git.<br>
</blockquote></div>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic