Hi!

Firstly, thank you to Philip for dedicating so much of his time to the development of squashfs :-)

On Tue, Feb 19, 2013 at 4:47 AM, Phillip Lougher <phillip@lougher.demon.co.uk> wrote:

What you have here is an unofficial Squashfs filesystem variant.  Someone has
taken my publicly available code, made various unknown modifications to the
code, and produced a filesystem variant which cannot be read by my code.

Unfortunately this happens quite a lot in embedded systems running Linux.
You need to go to your vendor and ask for their source code modifications, or
see if they've made them publicly available.  Under the GPL license they're
obliged to release the source code.  Unfortunately many vendors flout the
license and do not release the code.

That is exactly where we are with a couple of Broadcom (Huawei) devices.
In one case, the vendor has given us binaries for its tweaked versions of mksquashfs and unsquashfs, but no source code.
In another case, we don't even have those binaries. Pleas are being ignored.

In a brief study of this problem, we found that "the compressed bitstream itself has been tweaked. It looks like the hack goes deeper than just faking the LZMA header fields [as Igor Pavlov had suggested earlier] ."

See:
http://forum.kitz.co.uk/index.php/topic,10635.msg210146.html#msg210146
http://forum.kitz.co.uk/index.php/topic,10635.msg210860.html#msg210860
http://forum.kitz.co.uk/index.php/topic,10635.msg210937.html#msg210937

We tried to envisage the type of tweaks that could be performed on the LZMA compressed bitstream:

* It may be a simple, hard-coded stream-positional tweak: at bit n in the stream, flip the bit.
* Or the bitstream may be tweaked based on a comparison - e.g. at bit sequence  [b1:b2:..:bn] then flip bit n.
* Or maybe a combination of the two:  obtain a hash on file system image size or checksum, and then based on that hash (or part of it) then flip a particular bit.

Either way, the tweak is to be found in the LZMA Decoder. And the tweak must be present in both the kernel file system driver, and in the host tools (mksquashfs and unsquashfs).

Any further suggestions gratefully received.  This is one of those niggling issues that is hindering device liberation across the globe!

cheers,
asbokid

The Firmware mod kit project collects many unofficial Mksquashfs/Unsquashfs
variants modified by various embedded companies

http://code.google.com/p/firmware-mod-kit/

This maybe useful.

The GPL violations project webpage http://gpl-violations.org/ gives
some information on this common practice.

Phillip

> Because of lack of information about SquashFS and LZMA headers I'm unable to do anything to resolve this problem.
>
> The whole flash image contains more smaller SquashFS partitions which can be extracted with unsqashfs. Only with the two largest partitions (mtd4 and mtd5), which I think contains kernel image and main file system can't be extracted.
>
> I'll be thankful for any hints.
>
> Here are those two images that I'm talking about: http://goo.gl/pCskH
> Here is dmesg from the router: http://pastebin.com/UrSBDkTs
>
>
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
> is your hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials, tech docs,
> whitepapers, evaluation guides, and opinion stories. Check out the most
> recent posts - join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Squashfs-devel mailing list
> Squashfs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/squashfs-devel
>


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Squashfs-devel mailing list
Squashfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/squashfs-devel