<feed xmlns='http://www.w3.org/2005/Atom'>
<title>squashfs-tools-ng.git/lib, branch v1.1.3</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=v1.1.3</id>
<link rel='self' href='https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v1.1.3'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/'/>
<updated>2021-07-21T07:56:31+00:00</updated>
<entry>
<title>Fix libsquashfs directory writer size accounting</title>
<updated>2021-07-21T07:56:31+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-07-21T07:41:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=248494992442fbde7eb6ca3979a778d82fa86016'/>
<id>urn:sha1:248494992442fbde7eb6ca3979a778d82fa86016</id>
<content type='text'>
The squashfs readdir() implementation in the Linux kernel returns
non-existing "." and ".." entries for offsets 0 and 1, and after
that reads from disk. For convenience, it was decided to store an
off-by-3 value on disk instead of doing complex primary school math
to adjust for this. This didn't show up until now, because the kernel
implementation trusts the value from the directory header more than
the actual size in the inode and happily reads 3 more than the inode
would allow it to. This only showed up with 7-zip which subtracts 3
from the size and expects the result to be exact and bails if the
directory headers suggest otherwise.

And yes, I did consider making a "Holy Hand Granade of Antioch"
reference, but consciously decided not to.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix printf format specifiers used for generating tarballs</title>
<updated>2021-07-09T16:14:01+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-07-09T16:06:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=531d77736ece1398be75cf9b191a06b2e51f6304'/>
<id>urn:sha1:531d77736ece1398be75cf9b191a06b2e51f6304</id>
<content type='text'>
When processing files &gt; 4G, using "%o" truncates the result and the
tarball is not readable. This should have been discovered when
auto-patching the printf format specifiers, but a cast was added
instead and the issue was overlooked.

This commit replaces the down-cast and printf format specifiers.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libfstream: sanity check the buffer size in the gzip stream compressor</title>
<updated>2021-06-25T13:15:05+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-25T13:15:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=3cd56afbfcffca5f9b7ac19a8b2612411b1d3a2d'/>
<id>urn:sha1:3cd56afbfcffca5f9b7ac19a8b2612411b1d3a2d</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Add default cases for every switch block</title>
<updated>2021-06-25T13:12:41+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-25T12:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=d4690eeabe557753b394b8f83b5dbaf83e57e15f'/>
<id>urn:sha1:d4690eeabe557753b394b8f83b5dbaf83e57e15f</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Remove casual un-const casting in various places</title>
<updated>2021-06-25T13:12:41+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-24T14:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=8348086b48af0cbabe4cf2b64992ced6561ea50c'/>
<id>urn:sha1:8348086b48af0cbabe4cf2b64992ced6561ea50c</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libutil: cleanup alignment trickery in mempool</title>
<updated>2021-06-25T13:12:41+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-25T12:14:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=0880db76afe85391430c547a67bad54b655a66e1'/>
<id>urn:sha1:0880db76afe85391430c547a67bad54b655a66e1</id>
<content type='text'>
 - Store the return value of the page allocation directly into the
   pool variable instead of an intermediate unsigned char pointer.
 - Make the blob[] array the same type as the bitmap, this saves us
   manual alignment trickery.
 - Cleanup the pointer arithmetic, let the compiler do the
   sizeof() multiplication.
 - Use uintptr_t for the manual alignment of the data pointer, so we
   don't run into signdness problems there.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libsquashfs: get rid of potentially unaligned access and VLAs</title>
<updated>2021-06-25T13:12:41+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-25T12:12:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=41dc1dfaa0a290ef62800e603bb6b51a48501129'/>
<id>urn:sha1:41dc1dfaa0a290ef62800e603bb6b51a48501129</id>
<content type='text'>
The same problem with the meta data header again, 16 bit read from
a buffer: copy the buffer data into a 16 bit variable instead of
casting to something potentially unaligned.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libcommon: remove potentially un-aligned access in LZO compressor</title>
<updated>2021-06-25T13:12:41+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-25T11:24:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=1e90bd919b8ed104e3c77e411ab32060b4a1e39e'/>
<id>urn:sha1:1e90bd919b8ed104e3c77e411ab32060b4a1e39e</id>
<content type='text'>
When accessing the 16 bit header, don't cast the buffer pointer to an
uint16_t pointer, the result might not be aligned propperly. Instead
memcpy to and from an uint16_t.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libfstree: guard against possible overflow in readlink()</title>
<updated>2021-06-25T13:12:41+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-24T14:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=b409ddcec8c7ae304a7985e450b723fbb95cf4e9'/>
<id>urn:sha1:b409ddcec8c7ae304a7985e450b723fbb95cf4e9</id>
<content type='text'>
*in theory*, say on a 32 bit system, we could have a 32 bit size_t and
a 64 bit off_t. If the filesystem permitted this, we *could* then have
a symlink with a target &gt; 4G. Or the target is exacetely 4G, but
adding a null-terminator could exceed addressable memory.

This commit adds a check to guard against such an overflow and throw
an error, instead of silently wrapping around.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libfstree: guard against link count and inode number overflow</title>
<updated>2021-06-25T13:12:41+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-06-24T12:47:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=e567e9c5df1b0b9781d9e2a625c22302005cd95e'/>
<id>urn:sha1:e567e9c5df1b0b9781d9e2a625c22302005cd95e</id>
<content type='text'>
If the hard link counter or the inode number counter overflow the
maximum representable value (for SquashFS 16 bit and 32 bit
respecitively), abort with an error message.

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