diff options
author | Sean Nyekjaer <sean@geanix.com> | 2021-03-24 21:37:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-03-25 09:22:55 -0700 |
commit | c1b2028315c6b15e8d6725e0d5884b15887d3daa (patch) | |
tree | 21f9218bb3408481ed812ec0a879e721abf5b91e /fs/squashfs/squashfs_fs.h | |
parent | 6d679578fe9c762c8fbc3d796a067cbba84a7884 (diff) | |
download | linux-c1b2028315c6b15e8d6725e0d5884b15887d3daa.tar.gz linux-c1b2028315c6b15e8d6725e0d5884b15887d3daa.tar.bz2 linux-c1b2028315c6b15e8d6725e0d5884b15887d3daa.zip |
squashfs: fix inode lookup sanity checks
When mouting a squashfs image created without inode compression it fails
with: "unable to read inode lookup table"
It turns out that the BLOCK_OFFSET is missing when checking the
SQUASHFS_METADATA_SIZE agaist the actual size.
Link: https://lkml.kernel.org/r/20210226092903.1473545-1-sean@geanix.com
Fixes: eabac19e40c0 ("squashfs: add more sanity checks in inode lookup")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Acked-by: Phillip Lougher <phillip@squashfs.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/squashfs/squashfs_fs.h')
-rw-r--r-- | fs/squashfs/squashfs_fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/squashfs/squashfs_fs.h b/fs/squashfs/squashfs_fs.h index 8d64edb80ebf..b3fdc8212c5f 100644 --- a/fs/squashfs/squashfs_fs.h +++ b/fs/squashfs/squashfs_fs.h @@ -17,6 +17,7 @@ /* size of metadata (inode and directory) blocks */ #define SQUASHFS_METADATA_SIZE 8192 +#define SQUASHFS_BLOCK_OFFSET 2 /* default size of block device I/O */ #ifdef CONFIG_SQUASHFS_4K_DEVBLK_SIZE |