]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:28 +0000 (15:42 -0500)
commit021a7a06ec4c46bcb5eb11de35977fccf04c28d0
tree50737065f946f2e9f294f188d1812c2074a80afc
parenta6b3ace25e57f40dfdd50248db9ed8ce00abf718
squashfs: fix inode lookup sanity checks

BugLink: https://bugs.launchpad.net/bugs/1922601
commit c1b2028315c6b15e8d6725e0d5884b15887d3daa upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/squashfs/export.c
fs/squashfs/squashfs_fs.h