XZ embedded bug unpacking linux-3.8.tar.xz (was: Re: tar: short read on linux-3.8.tar.xz)

Denys Vlasenko vda.linux at googlemail.com
Mon Feb 25 06:14:28 UTC 2013


[CC'ing XZ embedded author]

On Sunday 24 February 2013 22:37, John Spencer wrote:
> > http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.8.tar.xz
> >
> > using busybox 1.20.2 and xz 5.0.3 or xz 5.0.4:
> >
> > $ tar xf linux-3.8.tar.xz
> >
> > i get: "short read" and exit status 1.
> > however the data seems to be there (at least partial).
> 
> the culprit is the file linux-3.8/drivers/media/tuners/mt2063.c
> 
> after doing xzcat linux-3.8.tar.xz > linux-3.8.tar , that file is 
> truncated after 4096*2+512 bytes.
> 
> xzcat is from busybox (not from xz, as i assumed earlier)
> 
> the .tar file is truncated at this point as well, it is only 200 MB, but 
> with xzcat from xz package, it is > 500 MB.

Apparently XZ embedded has a bug :(
Not only our in-tree one, but the latest git of it is buggy too:

$ git clone http://git.tukaani.org/xz-embedded.git
$ cd xz-embedded/userspace
$ make
$ ./xzminidec </tmp/linux-3.8.tar.xz | wc -c
./xzminidec: Unsupported check; not verifying file integrity
<......working for some time.......>
201330688

(xzminidec doesn't crash: exit code is zero).

The peculiar thing is that 201330688 is exactly 0x0c001000.
-- 
vda


More information about the busybox mailing list