<feed xmlns='http://www.w3.org/2005/Atom'>
<title>squashfs-tools-ng.git/lib/sqfs, branch v0.6.1</title>
<subtitle>A new set of tools and libraries for working with SquashFS images</subtitle>
<id>https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v0.6.1</id>
<link rel='self' href='https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v0.6.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/'/>
<updated>2019-08-25T11:47:25+00:00</updated>
<entry>
<title>Propperly set errno in read_inode_slink error path</title>
<updated>2019-08-25T11:47:25+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-25T08:25:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=14f02a946b875459db8b4290d316e7a99c6d9f75'/>
<id>urn:sha1:14f02a946b875459db8b4290d316e7a99c6d9f75</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Check against format limits in meta_reader_read_dir_header</title>
<updated>2019-08-23T11:44:13+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-23T11:25:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=e31c0fcd809a649b70e6bab08a8b89f9ced07510'/>
<id>urn:sha1:e31c0fcd809a649b70e6bab08a8b89f9ced07510</id>
<content type='text'>
The SquashFS kernel implementation insists that a directory header is
followed by no more than an upper bound of entries, way less than what
the filed itself actually supports.

This commit makes sure that the meta_reader_read_dir_header function
also enforces that same limit.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Size accounting + alloc() overflow checking, round #2</title>
<updated>2019-08-23T11:44:13+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-23T11:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=a38b1cbc5e917d945340a6dd9dba4274a2eb8789'/>
<id>urn:sha1:a38b1cbc5e917d945340a6dd9dba4274a2eb8789</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Do bounds checking in metadata reader</title>
<updated>2019-08-23T10:10:16+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-23T10:10:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=029a8db2701afb0653c6e789c878bb768ceb87e1'/>
<id>urn:sha1:029a8db2701afb0653c6e789c878bb768ceb87e1</id>
<content type='text'>
In all cases where metadata blocks are read, we can roughly (in some
cases even preciesly) say in what range those metadata blocks will be,
so it makes sense to throw an error if an attempt is made to wander
outside this range.

Furthermore, when reading from an uncompressed block, it is more reasonable
to check against the actual block bounds than to padd it with 0 bytes.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Some simple search/replace cases for allocation</title>
<updated>2019-08-23T00:09:51+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-22T23:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=7c028e224978e1d5a4f207cc42b9eb58d81897dd'/>
<id>urn:sha1:7c028e224978e1d5a4f207cc42b9eb58d81897dd</id>
<content type='text'>
This commit exchanges some malloc(x + y * z) patterns that can be found
with a simple git grep and are obvious for the new wrappers.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>deserialize_tree: filter out directory loops</title>
<updated>2019-08-22T16:24:26+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-22T14:33:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=8b16efb80d9a863641a0a7395204df038feeb56c'/>
<id>urn:sha1:8b16efb80d9a863641a0a7395204df038feeb56c</id>
<content type='text'>
The tree deserializer does a recursive depth-first search to populate
the directory tree, moving back and forth between the directory listing
containing the inode references and the inode table pointing to the
list of child inodes. It is completely unaware of hard links and creates
duplicate nodes instead.

It is possible to create a malicious SquashFS image that contains a
directory that contains as child a reference to its own inode. This
can also be done transitively (i.e. directory contains its own parent
or grand parent), leading to infinite recursion (actually finite, since
it terminates once all stack memory is exhausted).

This commit adds a simple check to see if a node has the same inode
number as any of its would-be parents. If it does, the node is discarded
and a warning message is emitted.

Other cases with arbitrary layers of indirection could be constructed
as well (e.g. dir 'a' contains hard link to 'b' and 'b' one back to 'a'),
but the sub hierarchies are always expanded, this check should catch that
too.

Reported-by: Zachary Dremann &lt;dremann@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix "no attributes" sentinel value for xattr reader</title>
<updated>2019-08-21T18:55:32+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-21T18:54:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=0a1738c877e5098030932cbf54768415fe25a7c1'/>
<id>urn:sha1:0a1738c877e5098030932cbf54768415fe25a7c1</id>
<content type='text'>
An inode can be of extended type for reasons other than having extended
attributes and simply set the xattr ID to 0xFFFFFFFF to indicate that
it doesn't have extended attributes.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix memory leak in data writer fragment deduplication</title>
<updated>2019-08-19T01:34:04+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-19T01:34:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=8b9eeb43c4f7d958972b8bf1fd39d19da570224b'/>
<id>urn:sha1:8b9eeb43c4f7d958972b8bf1fd39d19da570224b</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix memory leak in data writer error code paths</title>
<updated>2019-08-19T01:33:46+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-19T01:33:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=466adf661f1452e8cb8226faf7369e231aee9af3'/>
<id>urn:sha1:466adf661f1452e8cb8226faf7369e231aee9af3</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Replace update_crc32 helper function with crc32 from zlib</title>
<updated>2019-08-18T20:53:32+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2019-08-18T14:09:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=50385e06ec207af0171c021f1909e9ef38c00519'/>
<id>urn:sha1:50385e06ec207af0171c021f1909e9ef38c00519</id>
<content type='text'>
It is optimized to the maximum and if we already use zlib anyway,
why not use zlib crc32? This also makes zlib a hard dependency which
also means the whole "do we have a compressor" sanity check in the
build system can be removed.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
