aboutsummaryrefslogtreecommitdiffstats
path: root/fs/squashfs
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@squashfs.org.uk>2012-01-02 17:47:14 +0000
committerBen Hutchings <ben@decadent.org.uk>2012-09-12 03:37:36 +0100
commit4bddad580a7b4d023a981e2cbdf0c9e3837f6505 (patch)
tree63fab97c07dcd525f549f0a1a83296b4e141e5ec /fs/squashfs
parentb64c7d340e491c5bbcd62bc5617c49f7ee8693e2 (diff)
downloadkernel_samsung_smdk4412-4bddad580a7b4d023a981e2cbdf0c9e3837f6505.zip
kernel_samsung_smdk4412-4bddad580a7b4d023a981e2cbdf0c9e3837f6505.tar.gz
kernel_samsung_smdk4412-4bddad580a7b4d023a981e2cbdf0c9e3837f6505.tar.bz2
Squashfs: fix mount time sanity check for corrupted superblock
commit cc37f75a9ffbbfcb1c3297534f293c8284e3c5a6 upstream. A Squashfs filesystem containing nothing but an empty directory, although unusual and ultimately pointless, is still valid. The directory_table >= next_table sanity check rejects these filesystems as invalid because the directory_table is empty and equal to next_table. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/squashfs')
-rw-r--r--fs/squashfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index 2da1715..4619247 100644
--- a/fs/squashfs/super.c
+++ b/fs/squashfs/super.c
@@ -290,7 +290,7 @@ handle_fragments:
check_directory_table:
/* Sanity check directory_table */
- if (msblk->directory_table >= next_table) {
+ if (msblk->directory_table > next_table) {
err = -EINVAL;
goto failed_mount;
}