]> git.baikalelectronics.ru Git - kernel.git/commit
squashfs: fix inode lookup sanity checks
authorSean Nyekjaer <sean@geanix.com>
Thu, 25 Mar 2021 04:37:32 +0000 (21:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 25 Mar 2021 16:22:55 +0000 (09:22 -0700)
commit80a3b395dfff5accce68547ef6c35267a1806be9
tree21f9218bb3408481ed812ec0a879e721abf5b91e
parent0b9cba9e2e91a3bbe3f2799dadf9b7d942eafc91
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: 8084a5bc1d1c ("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>
fs/squashfs/export.c
fs/squashfs/squashfs_fs.h