Merge tag 'squashfs-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next
Pull squashfs updates from Phillip Lougher: "Add an extra mount time sanity check, plus some code cleanups and bug fixes." * tag 'squashfs-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next: Squashfs: add mount time sanity check for block_size and block_log match Squashfs: fix f_pos check in get_dir_index_using_offset Squashfs: get rid of obsolete definitions in header file Squashfs: remove redundant length initialisation in squashfs_lookup Squashfs: remove redundant length initialisation in squashfs_readdir Squashfs: update comment removing reference to zlib only Squashfs: use define instead of constant
此提交包含在:
@@ -158,10 +158,15 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
goto failed_mount;
|
||||
}
|
||||
|
||||
/* Check block log for sanity */
|
||||
msblk->block_log = le16_to_cpu(sblk->block_log);
|
||||
if (msblk->block_log > SQUASHFS_FILE_MAX_LOG)
|
||||
goto failed_mount;
|
||||
|
||||
/* Check that block_size and block_log match */
|
||||
if (msblk->block_size != (1 << msblk->block_log))
|
||||
goto failed_mount;
|
||||
|
||||
/* Check the root inode for sanity */
|
||||
root_inode = le64_to_cpu(sblk->root_inode);
|
||||
if (SQUASHFS_INODE_OFFSET(root_inode) > SQUASHFS_METADATA_SIZE)
|
||||
|
新增問題並參考
封鎖使用者