u-boot/fs/squashfs
David Oberhollenzer bf48dde80a fs/squashfs: Only use export table if available
For a squashfs filesystem, the fragment table is followed by
the following tables: NFS export table, ID table, xattr table.

The export and xattr tables are both completely optional, but
the ID table is mandatory. The Linux implementation refuses to
mount the image if the ID table is missing. Tables that are no
present have their location in the super block set
to 0xFFFFFFFFFFFFFFFF.

The u-boot implementation previously assumed that it can always
rely on the export table location as an upper bound for the fragment
table, trying (and failing) to read past filesystem bounds if it
is not present.

This patch changes the driver to use the ID table instead and only
use the export table location if it lies between the two.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2023-01-11 15:02:24 -05:00
..
Kconfig include/u-boot, lib/zlib: add sources for zlib decompression 2020-08-07 22:31:32 -04:00
Makefile fs/squashfs: new filesystem 2020-08-07 22:31:32 -04:00
sqfs_decompressor.c fs/squashfs: add support for LZO decompression 2020-08-24 14:11:31 -04:00
sqfs_decompressor.h fs/squashfs: replace sqfs_decompress() parameter 2020-08-24 14:11:31 -04:00
sqfs_dir.c squashfs: Fix compilation on big endian systems 2022-06-03 11:15:24 -04:00
sqfs_filesystem.h fs/squashfs: Fix some hardlinks reading the wrong inode 2021-08-04 15:58:31 -04:00
sqfs_inode.c fs/squashfs: Fix compilation error 2021-03-04 14:40:52 -05:00
sqfs_utils.h fs/squashfs: new filesystem 2020-08-07 22:31:32 -04:00
sqfs.c fs/squashfs: Only use export table if available 2023-01-11 15:02:24 -05:00