<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/squashfs, branch v2026.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/fs/squashfs?h=v2026.04</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/fs/squashfs?h=v2026.04'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-02-23T18:45:50Z</updated>
<entry>
<title>fs/squashfs: fix heap buffer overflow in sqfs_frag_lookup()</title>
<updated>2026-02-23T18:45:50Z</updated>
<author>
<name>Eric Kilmer</name>
<email>eric.kilmer@trailofbits.com</email>
</author>
<published>2026-02-20T19:48:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e365a269df5d01307390bdf7d6a1081d94b06470'/>
<id>urn:sha1:e365a269df5d01307390bdf7d6a1081d94b06470</id>
<content type='text'>
sqfs_frag_lookup() reads a 16-bit metadata block header whose lower
15 bits encode the data size. Unlike sqfs_read_metablock() in
sqfs_inode.c, this function does not validate that the decoded size is
within SQFS_METADATA_BLOCK_SIZE (8192). A malformed SquashFS image can
set the size field to any value up to 32767, causing memcpy to write
past the 8192-byte 'entries' heap buffer.

Add the same bounds check used by sqfs_read_metablock(): reject any
metadata block header with SQFS_METADATA_SIZE(header) exceeding
SQFS_METADATA_BLOCK_SIZE.

Found by fuzzing with libFuzzer + AddressSanitizer.

Signed-off-by: Eric Kilmer &lt;eric.kilmer@trailofbits.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>fs: prevent integer overflow in sqfs_concat</title>
<updated>2026-01-16T19:04:40Z</updated>
<author>
<name>Timo tp Preißl</name>
<email>t.preissl@proton.me</email>
</author>
<published>2026-01-09T11:24:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=870aff99a279ed428c5a2560b2441b3079ddb34b'/>
<id>urn:sha1:870aff99a279ed428c5a2560b2441b3079ddb34b</id>
<content type='text'>
An integer overflow in length calculation could lead to
under-allocation and buffer overcopy.

Signed-off-by: Timo tp Preißl &lt;t.preissl@proton.me&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;simon.glass@canonical.com&gt;
Reviewed-by: João Marcos Costa &lt;joaomarcos.costa@bootlin.com&gt;
</content>
</entry>
<entry>
<title>fs/squashfs: Ensure memory is freed by using unwind goto</title>
<updated>2025-10-10T20:27:49Z</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-10-02T10:36:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=87b7eaf3244e1a991404602c3422a4ce06bfae55'/>
<id>urn:sha1:87b7eaf3244e1a991404602c3422a4ce06bfae55</id>
<content type='text'>
Returning immediately from sqfs_read_nest is not consistent with other
error checks in this function and can lead to memory leaks. Instead use
the unwind goto used elsewhere to ensure that the memory is freed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
Acked-by: Quentin Schulz &lt;quentin.schulz@cherry.de&gt;
Reviewed-by: Joao Marcos Costa &lt;joaomarcos.costa@bootlin.com&gt;
</content>
</entry>
<entry>
<title>fs/squashfs: avoid illegal free() in sqfs_opendir()</title>
<updated>2025-04-21T17:08:03Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-04-14T13:19:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=185fdf5e94731df05748b1c576effb52ff7a3ec5'/>
<id>urn:sha1:185fdf5e94731df05748b1c576effb52ff7a3ec5</id>
<content type='text'>
* Use calloc() to allocate token_list. This avoids an illegal free if
  sqfs_tokenize() fails.
* Do not iterate over token_list if it has not been allocated.

Addresses-Coverity-ID: 510453:  Null pointer dereferences  (FORWARD_NULL)
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Joao Marcos Costa &lt;joaomarcos.costa@bootlin.com&gt;
Reviewed-by: Joao Marcos Costa &lt;jmcosta944@gmail.com&gt;
</content>
</entry>
<entry>
<title>Kbuild: Always use $(PHASE_)</title>
<updated>2025-04-11T18:16:44Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-04-01T22:55:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=302b41d5397e9f821d360a74335e8821d4513970'/>
<id>urn:sha1:302b41d5397e9f821d360a74335e8821d4513970</id>
<content type='text'>
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our
Makefiles as part of the macros to determine when to do something in our
Makefiles based on what phase of the build we are in. For consistency,
bring this down to a single macro and use "$(PHASE_)" only.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>fs/squashfs: Fix memory leak in sqfs_size_nest()</title>
<updated>2025-03-05T18:14:31Z</updated>
<author>
<name>Andrea della Porta</name>
<email>andrea.porta@suse.com</email>
</author>
<published>2025-03-02T18:29:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e22b2d778106256b44e8ed32e6ad7a5d8fff3ebd'/>
<id>urn:sha1:e22b2d778106256b44e8ed32e6ad7a5d8fff3ebd</id>
<content type='text'>
In case MAX_SYMLINK_NEST is reached while determining the size
on a symlink node, the function returns immediately.
This would not free the resources after the free_strings: label
causing a memory leak.

Set the ret value and just break out of the switch to fix this.

Signed-off-by: Andrea della Porta &lt;andrea.porta@suse.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>fs/squashfs: fix potential integer overflows</title>
<updated>2025-02-24T14:49:04Z</updated>
<author>
<name>Joao Marcos Costa</name>
<email>joaomarcos.costa@bootlin.com</email>
</author>
<published>2025-02-19T10:16:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=59fd62d71c6a04b3ab9db848414a7c386cfd2cfb'/>
<id>urn:sha1:59fd62d71c6a04b3ab9db848414a7c386cfd2cfb</id>
<content type='text'>
The length of buffers used to read inode tables, directory tables, and
reading a file are calculated as: number of blocks * block size, and
such plain multiplication is prone to overflowing (thus unsafe).

Replace it by __builtin_mul_overflow, i.e. safe math.

Signed-off-by: Joao Marcos Costa &lt;joaomarcos.costa@bootlin.com&gt;
</content>
</entry>
<entry>
<title>squashfs: Fix sqfs_inode_size() for xattr related SQFS_LSYMLINK_TYPE</title>
<updated>2025-01-18T14:29:10Z</updated>
<author>
<name>Norbert van Bolhuis</name>
<email>nvbolhuis@gmail.com</email>
</author>
<published>2024-12-24T00:49:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bbfa4fe13ca7645bd3033513dda48920e7c25542'/>
<id>urn:sha1:bbfa4fe13ca7645bd3033513dda48920e7c25542</id>
<content type='text'>
A squashfs filesystem with extended attributes (xattrs) may have
inodes of type SQFS_LSYMLINK_TYPE. This might cause u-boot to fail to
handle the filesystem since it assumes a SYMLINK_TYPE and LSYMLINK_TYPE
inode are the same size. This is wrong, see:
https://github.com/plougher/squashfs-tools/blob/master/squashfs-tools/read_fs.c#L421

Using the mksquashfs '-no-xattrs' argument is probably best, but the
mksquashfs '-xattrs' argument is the default.
This patch fixes squashfs image handling by making sure parsing the
uncompressed inode_table (with sqfs_find_inode) succeeeds. The only change
needed is correctly determining the size of a SQFS_LSYMLINK_TYPE inode.

Signed-off-by: Norbert van Bolhuis &lt;nvbolhuis@gmail.com&gt;
</content>
</entry>
<entry>
<title>global: Rename SPL_ to XPL_</title>
<updated>2024-10-11T17:44:48Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2024-09-30T01:49:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c46760d5967d12b6f7d37402878d1607a98b2b84'/>
<id>urn:sha1:c46760d5967d12b6f7d37402878d1607a98b2b84</id>
<content type='text'>
Use XPL_ as the symbol to indicate an SPL build. This means that SPL_ is
no-longer set.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>squashfs: Fix heap corruption in sqfs_search_dir()</title>
<updated>2024-08-15T22:14:36Z</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2024-08-02T20:05:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=048d795bb5b3d9c5701b4855f5e74bcf6849bf5e'/>
<id>urn:sha1:048d795bb5b3d9c5701b4855f5e74bcf6849bf5e</id>
<content type='text'>
res needs to be large enough to store both strings rem and target,
plus the path separator and the terminator.
Currently the space for the path separator is not accounted, so
the heap is corrupted by one byte.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
</feed>
