mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
Squashfs: fix mount time sanity check for corrupted superblock
commit cc37f75a9f 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>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b960ba5259
commit
9523d5244a
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user